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

postinstall can cause failed installation #1154

Closed
joefallon opened this Issue Dec 8, 2017 · 7 comments

Comments

3 participants
@joefallon

joefallon commented Dec 8, 2017

  • nodemon -v:
  • node -v:
  • Command you ran:
    npm install -g nodemon

Version 1.12.4 installs fine. Node version is 6.11.4. OS is Ubuntu 16.04 LTS.

5808 info lifecycle nodemon@1.12.5~postinstall: nodemon@1.12.5
5809 verbose lifecycle nodemon@1.12.5~postinstall: unsafe-perm in lifecycle false
5810 verbose lifecycle nodemon@1.12.5~postinstall: PATH: /root/.nvm/versions/node/v6.11.4/lib/node_modules/npm/bin/node-gyp-bin:/root/.nvm/versions/node/v6.11.4/lib/node_modules/nodemon/node_modules/.bin:/root/.nvm/versions/node/v6.11.4/lib/node_modules/.bin:/root/.nvm/versions/node/v6.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
5811 verbose lifecycle nodemon@1.12.5~postinstall: CWD: /root/.nvm/versions/node/v6.11.4/lib/node_modules/nodemon
5812 silly lifecycle nodemon@1.12.5~postinstall: Args: [ '-c',
5812 silly lifecycle   'node -e "console.log(\'\\u001b[32mLove nodemon? You can now support the project via the open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[96m\\u001b[1mhttps://opencollective.com/nodemon/donate\\u001b[0m\\n\')"' ]
5813 info lifecycle nodemon@1.12.5~postinstall: Failed to exec postinstall script
5814 verbose unlock done using /root/.npm/_locks/staging-f392ec34abf3ca27.lock for /root/.nvm/versions/node/v6.11.4/lib/node_modules/.staging
5815 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/nodemon/node_modules/fsevents):
5816 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5817 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
5817 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
5817 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
5817 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
5818 verbose stack Error: nodemon@1.12.5 postinstall: `node -e "console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n')"`
5818 verbose stack spawn ENOENT
5818 verbose stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v6.11.4/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
5818 verbose stack     at emitTwo (events.js:106:13)
5818 verbose stack     at ChildProcess.emit (events.js:191:7)
5818 verbose stack     at maybeClose (internal/child_process.js:920:16)
5818 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
5819 verbose pkgid nodemon@1.12.5
5820 verbose cwd /root
5821 verbose Linux 4.4.0-101-generic
5822 verbose argv "/root/.nvm/versions/node/v6.11.4/bin/node" "/root/.nvm/versions/node/v6.11.4/bin/npm" "install" "-g" "nodemon"
5823 verbose node v6.11.4
5824 verbose npm  v5.5.1
5825 error file sh
5826 error code ELIFECYCLE
5827 error errno ENOENT
5828 error syscall spawn
5829 error nodemon@1.12.5 postinstall: `node -e "console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n')"`
5829 error spawn ENOENT
5830 error Failed at the nodemon@1.12.5 postinstall script.
5830 error This is probably not a problem with npm. There is likely additional logging output above.
5831 verbose exit [ 1, true ]
@remy

This comment has been minimized.

Owner

remy commented Dec 9, 2017

Closing. Happy to reopen when you rephrase/edit your issue.

You're of course welcome to use another tool or stick on the version that works for you.

@remy remy closed this Dec 9, 2017

@PhilMDev

This comment has been minimized.

PhilMDev commented Jan 2, 2018

Just in case @joefallon sees this (and perhaps for @remy also?) I found information here: electron-userland/electron-prebuilt#263 that solved the same problem for me. I suspect it has to do with safety issues on the server I installed on. However, since I'm only using nodemon for testing I'm not too worried.

So I used: npm install -g nodemon --unsafe-perm=true --allow-root

Worked perfectly.

I would also like to complement @remy on this program. I'm sure you know how many developers use it. You certainly deserve to get paid for your work. And, asking to be paid is not out of line, IMHO. Thank you.

@remy remy reopened this Jan 3, 2018

@remy

This comment has been minimized.

Owner

remy commented Jan 3, 2018

@joefallon thank you for editing your original text.

I'm going to look at this today to see if I can work around this error from inside of nodemon. For now, if you're happy with the workaround that @PhilMDev that will get you past the error.

Issue is open now, and I hope to have a fix in soon.

@remy remy changed the title from Version 1.12.5 crashes on install. to postinstall can cause failed installation Jan 3, 2018

@joefallon

This comment has been minimized.

joefallon commented Jan 3, 2018

@remy Thank you. If it is any help the solution proposed by @PhilMDev works great. :)

@remy

This comment has been minimized.

Owner

remy commented Jan 5, 2018

@joefallon can you try installing using nodemon@debug? I've tweaked the postinstall script slightly in the hope that it doesn't bork the entire install process (as your example showed). If it works, then I'll publish it under a proper release (but I couldn't work out how to replicate the problem myself - sorry).

@remy

This comment has been minimized.

Owner

remy commented Jan 6, 2018

@joefallon I've released this change in 1.14.8 - even if the postinstall fails, it should cleanly exit the command which should prevent the whole process from bailing.

@joefallon

This comment has been minimized.

joefallon commented Jan 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment