lerna bootstrap fails but npm install still works
See original GitHub issueWe have a library of components, that seem to fail randomly fail to build.
Expected Behavior
lerna bootstrap
installs the packages correctly
Current Behavior
lerna bootstrap
fails with the following debug.log
688 timing audit body Completed in 1ms
689 silly lifecycle @organisation/package-name@1.0.0~install: Returned: code: 1 signal: null
690 info lifecycle @organisation/package-name@1.0.0~install: Failed to exec install script
691 verbose stack Error: @organisation/package-name@1.0.0 install: `cd ../ && lerna bootstrap`
691 verbose stack Exit status 1
691 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
691 verbose stack at EventEmitter.emit (events.js:197:13)
691 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
691 verbose stack at ChildProcess.emit (events.js:197:13)
691 verbose stack at maybeClose (internal/child_process.js:978:16)
691 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
692 verbose pkgid @organisation/package-name@1.0.0
693 verbose cwd C:\code\src\components\package-name
694 verbose Windows_NT 10.0.17134
695 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
696 verbose node v11.8.0
697 verbose npm v6.5.0
698 error code ELIFECYCLE
699 error errno 1
700 error @organisation/package-name@1.0.0 install: `cd ../../ && lerna bootstrap`
700 error Exit status 1
701 error Failed at the @organisation/package-name@1.0.0 install script.
701 error This is probably not a problem with npm. There is likely additional logging output above.
702 verbose exit [ 1, true ]
lerna.json
<!-- Please paste your `lerna.json` here -->
{
"packages": [
"components/*"
],
"version": "independent"
}
package.json
{
"name": "@organisation/package-name",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "neutrino build",
"start": "neutrino start",
"test": "neutrino test",
"install": "cd ../ && lerna bootstrap"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.18.0",
"react": "^16.6.0",
"react-dom": "^16.6.0",
"react-hot-loader": "^4.3.11",
"victory": "^31.2.0"
},
"devDependencies": {
"@neutrinojs/react": "^8.3.0",
"babel-eslint": "^10.0.1",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
"eslint": "^5.9.0",
"eslint-plugin-jest": "^22.1.2",
"eslint-plugin-json": "^1.3.2",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"neutrino": "^8.3.0",
"prop-types": "^15.6.2",
"raf": "^3.4.1"
}
}
Context
We are unable to use lerna in this project, and may have to find a new solution.
Your Environment
Executable | Version |
---|---|
lerna --version |
3.10.7 |
npm --version |
6.5.0 |
node --version |
v11.8.0 |
OS | Version |
---|---|
Windows 10 | 1803 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
lerna/bootstrap
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 >Install error with lerna and yarn workspace
Solution: Package A for us turned out to not be published to our NPM registry under any non-pre-release version. So, the solution was...
Read more >Legacy: Hoisting
Mostly-common dependencies are still hoisted, but outlier packages with different ... In this instance, lerna bootstrap will always use npm install with the ......
Read more >Untitled
```sh $ npm install --global lerna ``` Next we'll create a new folder: ```sh ... lerna-repo/ packages/ package.json lerna.json ``` ## How It...
Read more >@lerna/bootstrap | Yarn - Package Manager
Link local packages together and install remaining package dependencies ... core: more detailed error message when version cannot be found (#3424 (b729b0c) ...
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
You shouldn’t have an
install
script in any package. The only place you’d needlerna bootstrap
would be aprepare
script in the root, for example. Also, you should move all your devDependencies to the root (where you also presumably have lerna installed).Hi Folks 👋
You will have seen in our message above that we at Nrwl are working really hard to bring the lerna repo up to date with what matters most to its community in June 2022.
As previously stated in that message, because we have not heard from the original author of this issue within the last 14 days, we are now automatically closing it.
If any users, including the original author, are still impacted by this issue then we still want to hear from you!
All we ask is that you first update to the latest lerna (
5.1.4
at the time of writing) to make sure it is still reproducible, and then fill out one of our new issue templates, providing all the requested details which apply to your situation:https://github.com/lerna/lerna/issues/new/choose
Many thanks again! 🙏
P.S. Over and above getting to grips with the repo, we have also been hard at work launching a new website, resolving all vulnerabilities, merging exciting new features and reigniting community PR contributions! 🚀
You can read our recent blog post to learn more about what we’ve been up to: https://blog.nrwl.io/lerna-5-1-new-website-new-guides-new-lerna-example-repo-distributed-caching-support-and-speed-64d66410bec7