Skip to content
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

nw install fails on Debian 10 #43

Open
sid-the-sloth opened this issue Feb 15, 2020 · 1 comment
Open

nw install fails on Debian 10 #43

sid-the-sloth opened this issue Feb 15, 2020 · 1 comment

Comments

@sid-the-sloth
Copy link

Trying to install nw as per readme.md under: https:/zcbenz/nw-sample-apps

nw installation fails - can't figure out the failure reason even after reading the error log.

Please help.

On Debian 10, running with sudo for system-wide installation:

$ sudo npm install -g nw

The last part of the error log:

3564 silly postinstall [email protected]
3565 info lifecycle [email protected]~postinstall: [email protected]
3566 verbose lifecycle [email protected]~postinstall: unsafe-perm in lifecycle false
3567 verbose lifecycle [email protected]~postinstall: PATH: /opt/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/nodejs/lib/node_modules/nw/node_modules/.bin:/opt/nodejs/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
3568 verbose lifecycle [email protected]~postinstall: CWD: /opt/nodejs/lib/node_modules/nw
3569 silly lifecycle [email protected]~postinstall: Args: [ '-c', 'node scripts/install.js' ]
3570 silly lifecycle [email protected]~postinstall: Returned: code: 1  signal: null
3571 info lifecycle [email protected]~postinstall: Failed to exec postinstall script
3572 timing action:postinstall Completed in 16579ms
3573 verbose unlock done using /root/.npm/_locks/staging-64689f1deb8f5141.lock for /opt/nodejs/lib/node_modules/.staging
3574 timing stage:rollbackFailedOptional Completed in 121ms
3575 timing stage:runTopLevelLifecycles Completed in 24181ms
3576 verbose stack Error: [email protected] postinstall: `node scripts/install.js`
3576 verbose stack Exit status 1
3576 verbose stack     at EventEmitter.<anonymous> (/opt/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
3576 verbose stack     at EventEmitter.emit (events.js:182:13)
3576 verbose stack     at ChildProcess.<anonymous> (/opt/nodejs/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
3576 verbose stack     at ChildProcess.emit (events.js:182:13)
3576 verbose stack     at maybeClose (internal/child_process.js:962:16)
3576 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
3577 verbose pkgid [email protected]
3578 verbose cwd /home/<user>/foo/bar
3579 verbose Linux 4.19.0-6-amd64
3580 verbose argv "/opt/nodejs/bin/node" "/usr/bin/npm" "install" "-g" "nw"
3581 verbose node v10.15.0
3582 verbose npm  v6.13.7
3583 error code ELIFECYCLE
3584 error errno 1
3585 error [email protected] postinstall: `node scripts/install.js`
3585 error Exit status 1
3586 error Failed at the [email protected] postinstall script.
3586 error This is probably not a problem with npm. There is likely additional logging output above.
3587 verbose exit [ 1, true ]

Many thanks!

@sid-the-sloth
Copy link
Author

Solved:

The correct way to install system-wide on GNU/Linux, from root account:

# npm install --unsafe-perm=true -g nw

or, from user account:

$ sudo npm install --unsafe-perm=true -g nw

Perhaps the readme.md at https:/zcbenz/nw-sample-apps can be updated to reflect that. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant