Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic "resolution" fails in a workspace. #6806

Open
jpasquers opened this issue Oct 30, 2023 · 0 comments
Open

Basic "resolution" fails in a workspace. #6806

jpasquers opened this issue Oct 30, 2023 · 0 comments
Labels
bug Something isn't working bun install Something that relates to the npm-compatible client

Comments

@jpasquers
Copy link

What version of Bun is running?

1.0.7+b0393fba6200d8573f3433fb0af258a0e33ac157

What platform is your computer?

Darwin 22.6.0 arm64 arm

What steps can reproduce the bug?

Basic workspace setup. Package.json in the root looks like:

{
  "private": true,
  "workspaces": {
    "packages": [
      "packages/*"
    ]
  }
}

package.json in packages/pkg1 looks like:

{
  "name": "x",
  "version": "1.0.0",
  "license": "UNLICENSED",
  "private": true,
  "devDependencies": {
    "uncontrollable": "^7.2.1"
  },
  "resolutions": {
    "@types/react": "^17.0.0"
  }
}

Within packages/pkg1, run:

bun install
bun pm ls --all

The output is:

├── @babel/[email protected]
**├── @types/[email protected]**
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── x@workspace:packages/pkg1

What is the expected behavior?

The expected behavior is that following the resolution Bun should install 17..0.59 for @types/react.

What do you see instead?

Version 18.2.33 is installed.

Additional information

The same behavior works fine if done without workspaces. Am I running workspaces incorrectly? From my reading, the docs say:

The root package.json should not contain any "dependencies", "devDependencies", etc.

So I'm assuming I shouldn't be moving the resolution up to the root or anything right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bun install Something that relates to the npm-compatible client
Projects
None yet
Development

No branches or pull requests

2 participants