-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[BUG] npm install -g
of package itself calling npm in postinstall script causes constant 60s timeout
#757
Comments
I spent a few minutes to investigates this and could reproduce locally with your provided archive. I found a few things:
So for some reason the global install process gets stuck until the global lock file gets stalled and invalidated? My best guess so far is this:
So I guess the issue is having two package.json used in a global install with npm. I am not sure if there is a way to circumvent the issue though... |
Actually not sure this will work, but let's try. If that works, that means we're back to pre- #898 (comment) , with a 60s timeout due to npm bug npm/cli#757 Looking at a real fix, potentially coming back to `webpack` the app.
npm If your bug is preproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
Actually not sure this will work, but let's try. If that works, that means we're back to pre- nativefier#898 (comment) , with a 60s timeout due to npm bug npm/cli#757 Looking at a real fix, potentially coming back to `webpack` the app.
What / Why
I have a project with a CLI living in the project's
/
, producing Electron apps based on an app template living in/app/
. Both the CLI and app template are included in my npm package and, since both have dependencies, I have twopackage.json
files, one in/
specifying CLI deps and one in/app/
specifying template deps. I want to separate both dependency sets, but I do not want to split the app template (/app/
) into its own published npm package, because it has no intrinsic value on its own and is tied to the CLI living in/
.To automatically install the app template deps, the root
package.json
defines a simplepostinstall
script that calls"cd app && npm install"
.npm install
works perfectly...npm install -g
succeeds, but constantly finishes in a bit more than 60s, 99.9% of it spent in aexecuteActions
stage, suggesting something (a lock?) inside this stage times out.When
Consider this minimal reproduction package (here it is as npm-nested-minimal.tgz, please open it in an archive reader and verify it before installing):
, with
package.json
containing:, and
inner/package.json
containing:How
npm --verbose i -g npm-nested-minimal.tgz
Current Behavior
executeActions
stage (see logs below).-g
, the same command without-g
finishes instantly.postinstall
topreinstall
doesn't change anything.Logs for `npm --verbose i -g npm-nested-minimal.tgz`
Expected Behavior
Who
References
The text was updated successfully, but these errors were encountered: