简体   繁体   中英

NPM Install fails inconsitently

I'm trying to install some modules using NPM on Cygwin (Windows 7), but the install is going incredibly inconsistently. Some packages fail repeatedly on install, but some succeed; moreover, the same package can fail several times and then succeed with no change in the system. Installing the markdown package failed three times in a row, and then succeeded. The failures were:

npm ERR! couldn't unpack /tmp/npm-1310104605595/1310104605596-0.844648783095181/
tmp.tgz to /tmp/npm-1310104605595/1310104605596-0.844648783095181/contents
npm ERR! Error: EACCES, Permission denied '/tmp/npm-1310104605595/1310104605596-
0.844648783095181/contents/___package.npm/package'
npm ERR!
npm ERR! Please use 'sudo' or log in as root to run this command.
npm ERR!
npm ERR!     sudo npm "install" "markdown"
npm ERR!
npm ERR! or set the 'unsafe-perm' config var to true.
npm ERR!
npm ERR!     npm config set unsafe-perm true
npm ERR!
npm ERR! System CYGWIN_NT-6.1-WOW64 1.7.9(0.237/5/3)
npm ERR! command "node" "/usr/local/bin/npm" "install" "markdown"
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/Paul/node_modules/express/node_modules/connect/npm-debug.log
npm not ok

Has anyone experienced this, and if so, what was the solution? And yes, I've set the unsafe-perm config variable, and it doesn't seem to change anything... Also, this is not limited to just this package; pretty much anything I try to install seems to have this issue.

PS: I don't know if you filled an issue at Github yet because Isaacs prefers that to Stackoverflow.com. At github he will receive an email when somebody fills an issue and has excellent respond-times. But after a quick search it seems you allready filled an issue..

Windows Support

I'm trying to install some modules using NPM on Cygwin (Windows 7), but the install is going incredibly inconsistently.

NPM does NOT support Windows . Isaacs does not fix(allocate resources) to any bugs under Windows(Cygwin how does allocate some time to, but not that much) Operating System. He does fix bugs under Cygwin, but you are better of installing a POSIX OS.

Caveat 2: Sorry, Windows!

Any bugs about this not working on a native Windows system (ie, not Cygwin) will most likely be closed with wontfix.

If you ask me you are probably better of(Below I point to the WIKI page to install NPM on Cygwin) installing Ubuntu ( Unix ) using dual-boot and do your (web)development on Unix. When you get the hang of it you probably will never switch back to Windows again.

Installing under Cygwin

Also there is a page explaining how to install NPM .

Important : Make sure you follow ALL the steps. It'll seem like it's working before you get to the end, But it is a dirty. lying liar. Don't believe it. Do the steps all the way to the end, If you don't, you're going to complain that npm says “ECONNREFUSED” and then post a bug, and I'll ask if you did all the steps. and you'll feel silly.

Did you follow these steps on their WIKI page to install NPM on Windows=> https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM