post-install error #101

Closed
cjroebuck opened this Issue Nov 2, 2012 · 6 comments

Comments

Projects
None yet
4 participants

Getting the following error when trying to npm install lodash. I'm on mac osx 10.8.2, using node 0.8.14 installed from the official binaries. I'm not using n to manage node versions. Here is the error log:

npm info install lodash@0.9.1

> lodash@0.9.1 install /Users/cjroebuck/Dev/node_modules/lodash
> node build/post-install

There was a problem loading the npm registry.
npm info lodash@0.9.1 Failed to exec install script
npm info /Users/cjroebuck/Dev/node_modules/lodash unbuild
npm info preuninstall lodash@0.9.1
npm info uninstall lodash@0.9.1
npm info postuninstall lodash@0.9.1
npm ERR! lodash@0.9.1 install: `node build/post-install`
npm ERR! `sh "-c" "node build/post-install"` failed with 1
npm ERR! 
npm ERR! Failed at the lodash@0.9.1 install script.
npm ERR! This is most likely a problem with the lodash package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build/post-install
npm ERR! You can get their info via:
npm ERR!     npm owner ls lodash
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "lodash"
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! not ok code 0
Owner

jdalton commented Nov 2, 2012

Duplicate of #97.
Please see that issue for more info.

jdalton closed this Nov 2, 2012

Yep I saw that before posting, hence my comment about me not using n and installing the latest node/npm via the official binaries.

I'm not sure what else to do to try to fix this.

Owner

jdalton commented Nov 2, 2012

Yep I saw that before posting, hence my comment about me not using n and installing the latest node/npm via the official binaries.

Sorry, I missed that. @kitcambridge is on the case :D

jdalton reopened this Nov 2, 2012

I got the same issue, and managed to make it work with:

$> sudo npm cache clear
$> sudo npm install -g lodash

kitcambridge was assigned Nov 5, 2012

OK, I think I know what the problem is (and why it only seems to be affecting me!). In the post-install script, after it execs npm -g root, it checks for an exception or stderr. In my case there is no exception, however stderr is not empty and logging it out returns:

    npm info it worked if it ends with ok
    npm info using npm@1.1.65
    npm info using node@v0.8.14
    npm info ok 

So I think somehow i've redirected stdout to stderr or something. Any ideas how to reset this?!

jdalton closed this in 99f66a0 Nov 6, 2012

Owner

jdalton commented Nov 6, 2012

Any ideas how to reset this?!

My command-line/osx-fu is weaker than @kitcambridge's. Any ideas Kit?

@jdalton jdalton added a commit that referenced this issue Aug 29, 2013

@jdalton jdalton Remove `stderr` from the `exec` error check in `post-install.js`. [cl…
…oses #101]

Former-commit-id: eecd66ffe3bce1bd6ef0261140bd634567ec60ae
84d72d0

@jdalton jdalton added a commit that referenced this issue Sep 25, 2014

@jdalton jdalton Remove `stderr` from the `exec` error check in `post-install.js`. [cl…
…oses #101]

Former-commit-id: eecd66ffe3bce1bd6ef0261140bd634567ec60ae
7629bca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment