`lerna` does not create links on local referenced dependencies in package.json
See original GitHub issueI have some projects and I changed its dependencies by using file references in package.json: por example:
"dependencies": {
"@gcw/model": "file:../gcw-model",
"angular-animate": "1.7.9"
}
npm install
(version 6.13.7) creates a link in node_modules linking to the folder.
but lerna bootstrap (even lerna link --force-local) does not create it.
Expected Behavior
I expect that every time I execute lerna bootstrap, I have all my projects with links between them created.
Current Behavior
If I run npm install on every project. NPM does create the links, and Lerna does not delete it, which is ok, but if I delete the links, lerna does not create them either.
Steps to Reproduce (for bugs)
- Create a lerna style project with 2 or more projects
- Declare the dependency of one project to another referencing it using
file:../my-dep-proj
- Ensure that you don’t have already the link created inside node_modules
- Run
lerna boostrap
, and see it doing nothing about the link.
{
"packages": [
"packages/*"
],
"version": "0.20.0"
}
Your Environment
Executable | Version |
---|---|
lerna --version |
3.20.2 |
npm --version |
6.13.7 |
node --version |
v13.10.1 |
OS | Version |
---|---|
Windows 10 Pro | 1909 18363.657 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:6
Top Results From Across the Web
Lerna bootstrap does not link local dependencies · Issue #2352
I have configured two modules in a mono repo to use lerna with a local dependency. I expected that $ lerna bootstrap $...
Read more >Lerna bootstrap does not link local dependencies?
Another work-around is to manually "hoist" your intra-package dependencies by adding them to the root package.json per lerna issue #2352.
Read more >Managing Monorepo using Lerna and Yarn workspaces
First, you have to set the private and workspaces fields in package.json in the root directory. The private field should be true ,...
Read more >Setting up a monorepo with Lerna for a TypeScript project
lerna bootstrap installs and links all dependencies, both local and remote. When using lerna add , the lerna bootstrap command is called ...
Read more >How To Manage Monorepos With Lerna - DigitalOcean
Lerna is as a tool for managing JavaScript projects with multiple ... lerna info Creating package.json lerna info Creating lerna.json lerna ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to reproduce the behavior with
npm
6.14.6,yarn
1.22.4,lerna
3.22.1, andnode
v12.18.3. When I referenced the local packages with a version number instead of thefile:..
linklerna bootstrap
created the links.Hi Folks 👋
Please take a look at our published roadmap for Lerna v7 here: https://github.com/lerna/lerna/discussions/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.
lerna bootstrap
et al were developed in completely different era of the JavaScript ecosystem.If you have any specific concerns please do join in on that discussion, and provide as much context as possible.
Many thanks 🙏