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
Does lerna support npm 8? (esp. the overrides feature) #3102
Comments
Sad to hear that and fortunately enough the project I am working on is still in the early stage where Lerna can be switched out. |
you can take a look at the Lerna-Lite fork I created which is lighter version of Lerna with less commands, it's the same code as Lerna but I did push some fixes for NPM |
@garrychnca hey so I am recently in the process of migrating a monorepo from yarn workspaces to pnpm workspaces and had to use the override that is nearly identical to npm and it wasn't working when I tried to set into the |
Hi Folks 👋 Please take a look at our published roadmap for Lerna v7 here: #3410 One of the key items covered at length on there (please do read it for full context) is that now that we find ourselves in late 2022, it no longer makes sense for lerna to supplement package management concerns (such as installation, boostrapping, linking etc) which are covered reliably for monorepo workspaces by the three main package managers: npm, yarn and pnpm. If you have any specific concerns please do join in on that discussion, and provide as much context as possible. Many thanks 🙏 |
I need to use npm 8 for its "overrides" feature (reference: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) so that I can override a transitive dependency for one of the packages in the monorepo.
In the meanwhile, the monorepo is bootstrapped with:
I thought Lerna must have been delegating the install to npm so the overrides should just work, but that's not the case.
In the
package.json
of the package, I am trying to override the following:Expected Behavior
The
package-lock.json
in the root of the monorepo should have:Note the "declared" version of
"globby": "10.0.0"
vs the overridden version"version": "11.0.0"
above in two json objects.Current Behavior
The
package-lock.json
in the root of monorepo now has:Note that the declared version and the actual installed version are the same, meaning
overrides
not taking effect.Possible Solution
N/A
Steps to Reproduce (for bugs)
package.json
in a packagelerna.json
<!-- Please paste your `lerna.json` here -->
lerna-debug.log
Context
Your Environment
lerna --version
npm --version
yarn --version
node --version
| OS | Version |
| macOS Catalina | 10.15.7 |
| NAME | VERSION |
The text was updated successfully, but these errors were encountered: