-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Lerna does not support yarn 2 workspace:* url type #2564
Comments
There is WIP PR #2450 |
glad to see some progress on this! - i'll add that this also occurs when using pnpm workspaces, since they use the same workspace protocol |
Waiting for this feature too 👍 |
In the mean time... Is there any difference between using "workspace:..." vs "file:..."? |
Any workaround for this? Kinda surprising that this hasn't been looked at given the amount of users of both projects :/ |
@rhyek babel used to have some patches related to this if (ex. https://github.com/eankeen/babel/tree/72712f236b52ae8db27e03a08a59ced08b23efef/.yarn-patches/%40lerna). what i did is use some of those patches, change them a bit to work with |
@rhyek a workaround is to replace the build command in package.json with package.json
instead of e.g. |
Until lerna/lerna#2564 is revolved
It seems like lerna doesn't support them. See lerna/lerna#2564. This reverts commit dfbd991. This reverts commit c6de850.
|
I'm having the same issue. I'm using pnpm and my |
Until this issue is resolved, would it make sense to remove this text from https://yarnpkg.com/features/workspaces#yarn-workspaces-vs-lerna? It is so far as I can tell factually incorrect. If there is some sense in which it is correct, maybe there is some improvement to the wording that doesn't have the same risk of misleading users into thinking some things will work that don't.
|
Now that Lerna is taken over by Nx, will this get fixed in the forseeable future? |
We have the same issue as that. But seem the Nx team might be doesn't prioritize this issue 😄. So might be we must use another approach like the native |
@weiwei @harrytran998 and everyone else... I'm sure that Lerna will eventually bring the feature but for now Lerna-Lite is a good alternative and it works pretty well with the Cheers and happy coding |
Hope this can be fixed asap |
Are there any plans for fixing this issue? |
It's actively being worked on as we speak, and will complement similar updates for pnpm support in #3284 |
Hi Folks, I'm going to close this one as If you run into any issues please feel free to open a new issue with as much context as possible. Many thanks! |
Lerna does not seem to support the new workspace:* version schema used in yarn2. This seems really strange to me given that the yarn documentation mentions Lerna immediately after the section in the documentation on workspace:* so I may be missing something here.
Expected Behavior
I would expect Lerna to understand this dependency format and resolve to the local workspace copy of the package.
Current Behavior
Lerna: ERR! Error: unsupported url type "workspace:": "workspace:*"
Steps to Reproduce (for bugs)
Create a simple repo using yarn 2 with packages a and b
Run
yarn workspace a add b@workspace:*
Run lerna version
Your Environment
lerna --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: