use npm to install grunt-cli and make some error both sudo or not #5497

Closed
shuizhongyueming opened this Issue Jun 17, 2014 · 4 comments

Comments

Projects
None yet
4 participants
@shuizhongyueming

My Issue is same like #3700

But my node version is big than 0.10.15.
I make both the sudo and not sudo, both take some error.

This is the not sudo:

bash-3.2$ npm install -g grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http 304 https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/resolve
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/resolve
npm http 304 https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm ERR! Error: EACCES, symlink '../lib/node_modules/grunt-cli/bin/grunt'
npm ERR!  { [Error: EACCES, symlink '../lib/node_modules/grunt-cli/bin/grunt']
npm ERR!   stack: 'Error: EACCES, symlink \'../lib/node_modules/grunt-cli/bin/grunt\'',
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '../lib/node_modules/grunt-cli/bin/grunt' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /usr/local/lib/node_modules
npm ERR! node -v v0.11.4
npm ERR! npm -v 1.3.4
npm ERR! path ../lib/node_modules/grunt-cli/bin/grunt
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '../lib/node_modules/grunt-cli/bin/grunt'
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!  { [Error: EACCES, open 'npm-debug.log']
npm ERR!   stack: 'Error: EACCES, open \'npm-debug.log\'',
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: 'npm-debug.log' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /usr/local/lib/node_modules
npm ERR! node -v v0.11.4
npm ERR! npm -v 1.3.4
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/lib/node_modules/npm-debug.log
npm ERR! not ok code 0

This is the sudo:

bash-3.2$ sudo npm install -g grunt-cli
Password:
npm http GET https://registry.npmjs.org/grunt-cli
npm http 304 https://registry.npmjs.org/grunt-cli
npm ERR! TypeError: uid must be an int
npm ERR!     at Object.fs.chown (fs.js:840:11)
npm ERR!     at Object.chown (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:131:17)
npm ERR!     at endChown (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:212:12)
npm ERR!     at setProps (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:295:5)
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:286:7
npm ERR!     at Object.oncomplete (fs.js:94:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /usr/local/lib/node_modules
npm ERR! node -v v0.11.4
npm ERR! npm -v 1.3.4
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/lib/node_modules/npm-debug.log
npm ERR! not ok code 0

@iarna iarna added the support label Sep 19, 2014

@smikes

This comment has been minimized.

Show comment Hide comment
@smikes

smikes Nov 20, 2014

Contributor

Is this still a problem for you?

There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.3.4. Can you try updating your npm installation?

To update npm, run npm -g install npm@latest

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and re-open it!)

Thanks!

Contributor

smikes commented Nov 20, 2014

Is this still a problem for you?

There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.3.4. Can you try updating your npm installation?

To update npm, run npm -g install npm@latest

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and re-open it!)

Thanks!

@shuizhongyueming

This comment has been minimized.

Show comment Hide comment
@shuizhongyueming

shuizhongyueming Nov 23, 2014

it's ok right now, thanks

it's ok right now, thanks

@Harris-Miller

This comment has been minimized.

Show comment Hide comment
@Harris-Miller

Harris-Miller Jan 9, 2015

I'm getting this same issue on windows with the latest versions of node + npm

λ npm install grunt-cli -g
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "C:\\Users\\harris.miller\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt-cli" "-g"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.18

npm ERR! uid must be an unsigned int
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>
-
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\harris.miller\npm-debug.log

I'm getting this same issue on windows with the latest versions of node + npm

λ npm install grunt-cli -g
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "C:\\Users\\harris.miller\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt-cli" "-g"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.18

npm ERR! uid must be an unsigned int
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>
-
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\harris.miller\npm-debug.log
@smikes

This comment has been minimized.

Show comment Hide comment
@smikes

smikes Jan 9, 2015

Contributor

@Harris-Miller could you please open a new issue if this persists? But you can probably fix it with

npm config del user

Contributor

smikes commented Jan 9, 2015

@Harris-Miller could you please open a new issue if this persists? But you can probably fix it with

npm config del user

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