Skip to content

fix: add missing runtime dependencies for pnpm strict mode - #8099

Merged
bijin-bruno merged 3 commits into
usebruno:mainfrom
aritradhabal:bugfix/pnpm-missing-dependencies
Sep 18, 2026
Merged

bijin-bruno merged 3 commits into
usebruno:mainfrom
aritradhabal:bugfix/pnpm-missing-dependencies

Conversation

@aritradhabal

@aritradhabal aritradhabal commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #8077
Internal - BRU-3489

Bruno CLI fails with Cannot find module 'qs' when installed globally with pnpm 11. This happens because pnpm uses a strict node_modules layout where packages can only access dependencies they explicitly declare. npm/yarn mask this by hoisting everything flat.

Three missing/misplaced dependency declarations were fixed:

Files Changed:

  • packages/bruno-requests/package.json : Added qs to dependencies. It's imported in oauth2-helper.ts but only @types/qs was declared.
  • packages/bruno-filestore/package.json : Moved nanoid from devDependencies to dependencies. It's required at runtime in utils/index.ts.
  • packages/bruno-js/package.json : Added @usebruno/requests to dependencies. It's required at runtime in bru.js but was never declared.
  • package-lock.json : Updated to reflect the above changes.

After fix:

Screenshot 2026-05-26 at 01-31-19

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Summary by CodeRabbit

  • Chores
    • Updated package dependency configuration to ensure required runtime functionality is available when using the JavaScript and request-related packages.
    • Improved dependency clarity and runtime availability by promoting a utility to a runtime dependency and declaring required request and query-string support.

Copilot AI review requested due to automatic review settings May 25, 2026 20:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates package dependency declarations to ensure required runtime modules are available and align package relationships across the monorepo.

Changes:

  • Add qs to bruno-requests dependencies.
  • Add @usebruno/requests dependency to bruno-js.
  • Move nanoid from devDependencies to dependencies in bruno-filestore.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/bruno-requests/package.json Adds qs as a runtime dependency.
packages/bruno-js/package.json Adds dependency on @usebruno/requests.
packages/bruno-filestore/package.json Reclassifies nanoid as a runtime dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/bruno-js/package.json Resolved
Comment thread packages/bruno-requests/package.json Resolved
@coderabbitai

coderabbitai Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 2fc032ed-dc3d-4e9a-8364-1b5bacc8f352

📥 Commits

Reviewing files that changed from the base of the PR and between 2f7e6f1 and 5c1a948.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • packages/bruno-filestore/package.json
  • packages/bruno-js/package.json
  • packages/bruno-requests/package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


Walkthrough

Adds missing runtime dependency declarations: qs to @usebruno/requests, @usebruno/requests to @usebruno/js, and moves nanoid to dependencies in @usebruno/filestore.

Changes

Runtime Dependency Declarations

Layer / File(s) Summary
Runtime dependencies across packages
packages/bruno-requests/package.json, packages/bruno-js/package.json, packages/bruno-filestore/package.json
qs is added to @usebruno/requests dependencies. @usebruno/requests is added to @usebruno/js dependencies. nanoid is moved from devDependencies to dependencies in @usebruno/filestore.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 5c1a9

The dependency declarations consistently address runtime installation under pnpm strict mode, with no remaining merge risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding missing runtime dependencies to support pnpm strict mode.
Linked Issues check ✅ Passed PR #8099 addresses the coding requirements in issue #8077. packages/bruno-requests/package.json declares qs as a runtime dependency. packages/bruno-filestore/package.json moves nanoid from `de…
Out of Scope Changes check ✅ Passed The reported changes are limited to runtime dependency declarations in the three packages named by issue #8077. The dependency lockfile update is supporting package-management metadata. No unrelated s…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Packages declare what runtime imports need,
qs and nanoid now heed,
Requests connects to bruno-js,
Strict installs resolve with ease,
Three manifests keep dependencies complete.

Comment @coderabbitai help to get the list of available commands.

@TheDevMinerTV

Copy link
Copy Markdown

You could even get rid of qs and use something built into the JS engines: https://replacements.fyi/qs

@sreelakshmi-bruno

Copy link
Copy Markdown
Collaborator

Hi @aritradhabal , thank you for the PR. We'll look into it.

@aritradhabal

Copy link
Copy Markdown
Contributor Author

Thank you!

@Garbee

Garbee commented Jun 26, 2026

Copy link
Copy Markdown

@sreelakshmi-bruno Any movement on the investigation here? This is a big blocker for projects trying to keep current. It means either staying back on pnpm or getting rid of Bruno.

# Conflicts:
#	package-lock.json
#	packages/bruno-filestore/package.json
#	packages/bruno-js/package.json
#	packages/bruno-requests/package.json
@bijin-bruno
bijin-bruno merged commit 1d2ae7f into usebruno:main Sep 18, 2026
19 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bruno CLI 3.4.0 fails with pnpm 11: Cannot find module 'qs'

7 participants