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

Problem with local packages in turborepo #182

Open
motiejunas opened this issue Jun 24, 2023 · 3 comments
Open

Problem with local packages in turborepo #182

motiejunas opened this issue Jun 24, 2023 · 3 comments

Comments

@motiejunas
Copy link

motiejunas commented Jun 24, 2023

I have this dependency in my app package.json:
"lib": "file:../../packages/lib"

lib package.json:

{
"name": "lib",
"version": "0.0.0",
"main": "./src/index.ts",
"types": "./src/index.ts"
}

I get this error when run npm install:

☔️ error api has a dependency on lib@file:../../packages/lib but the version of lib in the repo is 0.0.0 which is not within range of the depended on version, please update the dependency version
☔️ info the above errors may be fixable with yarn manypkg fix

I think this is a bug.

@tkambler
Copy link

tkambler commented Jun 29, 2023

Note: There seems to be an incompatibility problem here with manypkg and pnpm. This problem was first reported three years ago.

I have the same problem, but I'm referencing my local package dependency (ui) using the workspace:... syntax via pnpm:

"ui": "workspace:*"

Error:

web has a dependency on ui@workspace:* but the version of ui in the repo is 0.0.1 which is 
not within range of the depended on version, please update the dependency version

Related:

While this does work, be advised that you may be missing out on some of the benefits that come along with using the workspace:... protocol.

@Andarist
Copy link
Collaborator

Andarist commented Jun 29, 2023

PRs are welcome 😉 I definitely don't have the capacity to work on this but I could review a PR that would introduce such a feature.

@jonathanpowers-storable
Copy link

@Andarist Could you take a look at this PR? It seems to provide at least basic workspace support.

Turborepo defaults to pnpm and also recommends @manypkg/cli for managing deps, so this issue is going to pop up for anyone using that set of tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants