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
Bootstrap does not execute the dependencies' script since 3.9.0 #1855
Comments
We're experiencing a similar issue in https://github.com/automattic/wp-calypso -- the project uses |
The problem seems to be the That's OK for the packages managed by Lerna, because the But it's not OK for the packages installed with The issue is made much more difficult to work around by the fact that the buggy code is in the
doesn't work. |
Can someone please address this as of this is breaking all versions of lerna hence they use caret in the dependencies to @lerna/bootstrap which will always install the latest version of @lerna/bootstrap. |
For me this is showing up as Relevant parts of {
"scripts": {
"prepare": "lerna bootstrap --hoist"
},
"devDependencies": {
"lerna": "^3.6.0",
"node-sass": "^4.9.2"
}
} Lerna's console prints from Jenkins build:
A build from yesterday with the same node-sass version but lerna 3.8.5 succeeded. |
Well you can do this still, in your package.json: "devDependencies": {
// ...
"lerna": "3.8.5",
"@lerna/bootstrap": "3.8.5"
// ...
} i.e. just add a direct dependency to the still-working @lerna/bootstrap version, and it'll get installed by npm to a place where the main lerna package will use it, as it matches its |
This might work for you project, but this is actually breaking everything as soon as you have lerna installed globally (Docker image, locally, etc .. ) |
Yeah, sorry about that, everyone. I thought I was being clever. Reverting it now.
|
Thank you for your work! Had a rough time yesterday debugging this but never thought about looking through Lerna's source. |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Looks like
lerna bootstrap
command does not execute the dependencies' script since 3.9.0.To reproduce, you may set a monorepo like:
[/package.json]
[/packages/package1/package.json]
...and
npm i
andnpx lerna init
.Expected Behavior
The packages with
install
script (likepuppeteer
) has to execute it during installation. For example forpuppeteer
, it downloads chromium and saves it to the directory of/node_modules/puppeteer/.local-chromium
, which is the sign thatinstall
script is executed.Current Behavior
It doesn't seem to execute
install
script of each dependencies.Steps to Reproduce (for bugs)
npx lerna bootstrap
in monorepo root, regardless of using--hoist
or--no-ci
.lerna.json
Your Environment
lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: