Running lerna bootstrap does not install all dependencies
See original GitHub issueExpected Behavior
When running lerna bootstrap
all dependencies should be install in packages.
Current Behavior
If I run lerna bootstrap
and then run lerna start
to start all my clients and packages, I get the following error:
@raisalholdings/raisal-ui: 2263 modules
@raisalholdings/raisal-ui: ERROR in ../raisal-utils/src/reduxUtils.js
@raisalholdings/raisal-ui: Module not found: Error: Can't resolve 'redux-actions' in '/Users/scott/Develop/Raisal/2.0/raisal-clients/packages/raisal-utils/src'
@raisalholdings/raisal-ui: ERROR in ../raisal-utils/src/reduxUtils.js
@raisalholdings/raisal-ui: Module not found: Error: Can't resolve 'redux-optimistic-ui' in '/Users/scott/Develop/Raisal/2.0/raisal-clients/packages/raisal-utils/src'
If I cd into packages/raisal-ui
, and run yarn
, I get the following error:
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/Users/scott/Develop/Raisal/2.0/raisal-clients/packages/raisal-ui/node_modules/@raisalholdings/raisal-utils/node_modules/history/node_modules'".
...
But if I run yarn one more time, everything installs in raisal-ui and I can then run lerna run start
and everything starts fine.
Possible Solution
Install all deps or provide logs to debug
I have the following setup:
root/
clients/
packages/
lerna.json
package.json
lerna.json
{
"lerna": "2.5.1",
"packages": [
"clients/*",
"packages/*"
],
"npmClient": "yarn",
"version": "2.1.13"
}
Your Environment
Executable | Version |
---|---|
lerna --version |
2.5.1 |
npm --version |
6.0.0 |
yarn --version |
1.6.0 |
node --version |
v8.9.3 |
OS | Version |
---|---|
Sierra | 10.13.1 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:95
- Comments:66 (5 by maintainers)
Top Results From Across the Web
Lerna bootstrap does not link local dependencies?
lerna bootstrap is supposed to link to packages that are already installed. the issue is that sometimes it doesn't link dependencies of ...
Read more >@lerna/bootstrap - npm
Bootstrap the packages in the current Lerna repo. Installs all of their dependencies and links any cross-dependencies. When run, this command will:.
Read more >FAQ | Lerna
For any packages that you add to your Lerna repository, instead of running npm install you should run lerna bootstrap . This will...
Read more >lerna bootstrap - Fig.io
Options ; --hoist <glob>, Install external dependencies matching glob at the repo root so they're available to all packages ; --nohoist <glob>, Do...
Read more >Untitled
When run, this command will: 1. `npm install` all external dependencies of each package. 2. Symlink together all Lerna `packages` that are dependencies...
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 Free
Top 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
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Thanks @scottmcpherson! I also came to this simple workaround:
So the
lerna exec npm install
command does the trick.