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

Workspace dependency not found #11064

Closed
nervetattoo opened this issue May 14, 2024 · 3 comments · Fixed by #11177
Closed

Workspace dependency not found #11064

nervetattoo opened this issue May 14, 2024 · 3 comments · Fixed by #11177
Assignees
Labels
bug Something isn't working npm Something that relates to the npm-compatible client

Comments

@nervetattoo
Copy link

nervetattoo commented May 14, 2024

What version of Bun is running?

1.1.8+89d25807f

What platform is your computer?

Darwin 23.3.0 arm64 arm

What steps can reproduce the bug?

Seeing a regression when going from 1.1.7 to 1.1.8

Monorepo root package.json has:

{
  "workspaces": [
    "{apps,packages}/**"
  ]
}

Now from say apps/foo which has a workspace dependency that is covered by packages/schema

{
  "dependencies": {
      "schema": "workspace:*",
  }
}

When I run bun add <anything> in 1.1.8 it ends in the error

error: workspace dependency "schema" not found

Searched in "./schema"

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

I tried bun i -f from root which did nothing, then I tried removing bun.lockb and doing bun i in case some weird things were encoded in the lockfile after upgrading to 1.1.8. Nothing helped.

@nervetattoo nervetattoo added the bug Something isn't working label May 14, 2024
@nervetattoo
Copy link
Author

The relevant piece is having two workspace roots and then grabbing a workspace dependency from the other root (apps/foo depending on packages/lib). That seems to repro it for me.

@Electroid Electroid added the npm Something that relates to the npm-compatible client label May 14, 2024
@MonsterDeveloper
Copy link

Same here. After upgrading to 1.1.8 can't bun add in a workspace package. The workaround I could think of is manually adding a dep to package.json and then running bun i from the workspace root.

@Jarred-Sumner
Copy link
Collaborator

@dylan-conway is working on a fix

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

Successfully merging a pull request may close this issue.

5 participants