I get the Following on imac when install grunt
sudo npm install grunt-cli -g
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 12.4.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "grunt-cli" "-g"
npm ERR! cwd /usr
npm ERR! node -v v0.11.5-pre
npm ERR! npm -v 1.3.4
Please Help me figure out what I am doing wrong here thanks!
Solved it by using version 0.10.13.
Related
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/protagonist/drafter/ext/sos/test/ext/Catch/projects/VS2008/TestCatch/TestCatch/TestCatch.vcproj'
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 Linux 3.4.0+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "aglio"
npm ERR! cwd /mnt/c/Users/HEWLETT PACKARD'
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/protagonist/drafter/ext/sos/test/ext/Catch/projects/VS2008/TestCatch/TestCatch/TestCatch.vcproj
npm ERR! fstream_path /usr/local/lib/node_modules/aglio/node_modules/drafter/node_modules/protagonist/drafter/ext/sos/test/ext/Catch/projects/VS2008/TestCatch/TestCatch/TestCatch.vcproj
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! weird error 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /mnt/c/Users/HEWLETT PACKARD'/npm-debug.log
npm ERR! not ok code 0
I am not sure about this problem. I have tried, but it is useless.
If the above error is not readable, you can see the link here.
Reference to agilo.
Resolved:
I used nvm and successfully installed aglio using node v0.12.
Discussed on the issue of github aglio
https://github.com/danielgtaylor/aglio/issues/175
Attempting to install Yeoman on my mac, I first tried following command from the documentation...
npm install -g yo
Got an error:
npm ERR! Please try running this command again as root/Administrator.
I tried again with:
sudo npm install -g yo
but it fails half-way through. This is the feedback where it fails and it repeats this pattern for a lot of failed packages.
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/glob/.travis.yml'
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.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /Users/vivid
npm ERR! node -v v0.10.7
npm ERR! npm -v 1.2.21
npm ERR! path /usr/local/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/glob/.travis.yml
npm ERR! fstream_path /usr/local/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/glob/.travis.yml
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
Any thoughts?
I ran into the same problem. What fixed it for me was simply logging in as root first, using:
$ su
Next, installing Yeoman worked like a charm:
$ npm install -g yo
The big difference is the logging in as root using su, instead of sudo.
Now I have installed Node and Npm and I run this command in terminal (yes I am on a mac):
npm install -g bower
Which follows with this output from the terminal:
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/bower']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/bower',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/bower',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/Superfunnytogo
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path /usr/local/lib/node_modules/bower
npm ERR! fstream_path /usr/local/lib/node_modules/bower
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Superfunnytogo/npm-debug.log
npm ERR! not ok code 0
Device-365-352:~ Superfunnytogo$ npm install -g bower
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/bower']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/bower',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/bower',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/Superfunnytogo
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path /usr/local/lib/node_modules/bower
npm ERR! fstream_path /usr/local/lib/node_modules/bower
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Superfunnytogo/npm-debug.log
npm ERR! not ok code 0
You need root access or permissions to install globally! Try :
sudo npm install -g bower
Much better than using sudo is setting a user level prefix. For example in ~/.npmrc set:
prefix = ${HOME}/npm-global
to use this folder for packages installed with -g.
Then you also need to set your PATH environment variable to include ${HOME}/npm-global/bin.
you shouldn't sudo bower right? I mean sudo npm install -g bower will work BUT here's the message I got:
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814
You can however run a command with sudo using --allow-root option
If you've installed node/npm via Homebrew on OSX you may want to first run brew doctor and follow instructions before sudo-ing any system folders. In my case this brought up a nag about agreeing to an Xcode/iOS license:
Builds will fail! Agree to the license by opening Xcode.app or running:
xcodebuild -license
After doing that and running a brew update I was able to install Bower globally as expected.
I know that it's an old thread but I run into the issue recently after reinstalling Yosemite and xCode tools. In case anyone else gets stuck, what helped me was using the commands:
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
Following suggestion from the thread below:
https://github.com/bower/bower/issues/2262
Using sudo with npm is discouraged.
Look here https://stackoverflow.com/a/18277225/1857521 for a better solution to an almost identical problem.
I have problem while installing PhoneGap on my Mac OS machine using:
sudo npm install -g phonegap
Error message:
npm ERR! Error: shasum check failed for /Users/MYUSER/tmp/npm-33966-l4NZ7A8D/1387281663617-0.9133979633916169/tmp.tgz
npm ERR! Expected: dee5a33ff04d7217194dc1ad1342e3a441761942
npm ERR! Actual: ab7d89ca1f31db14db047d01222dd968649cfb50
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:120:20)
npm ERR! at _stream_readable.js:896:16
npm ERR! at process._tickCallback (node.js:599:11)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "phonegap"
npm ERR! cwd /Users/HummusawY
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.17
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/MYUSER/npm-debug.log
npm ERR! not ok code 0
Try this:
sudo npm install https://registry.npmjs.org/npm/-/npm-1.3.19.tgz
then
sudo npm install -g phonegap
The problem on my checksum was caused by https://registry.npmjs.org/npm/-/npm-1.3.19.tgz
Try this first
"npm set registry https://registry.npmjs.org/"
if failed then try to use the npm mirror:
"npm set registry http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com"
then use it normally:
npm install express
You can downgrade Node.js to version 0.10.19 to solve the issue
try: npm install https://registry.npmjs.org/npm/-/npm-1.3.21.tgz
change from "19" to 21
Caseys-MacBook-Pro:~ casey$ npm install -g topojson
npm http GET https://registry.npmjs.org/topojson
npm http 200 https://registry.npmjs.org/topojson
npm http GET https://registry.npmjs.org/topojson/-/topojson-1.1.4.tgz
npm http 200 https://registry.npmjs.org/topojson/-/topojson-1.1.4.tgz
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/topojson'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/topojson']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/topojson',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/topojson',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "topojson"
npm ERR! cwd /Users/casey
npm ERR! node -v v0.10.11
npm ERR! npm -v 1.2.30
npm ERR! path /usr/local/lib/node_modules/topojson
npm ERR! fstream_path /usr/local/lib/node_modules/topojson
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/topojson'
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/casey/npm-debug.log
npm ERR! not ok code 0
I have no idea what to do or how to fix this.
I think that I fixed by using sudo.
I also fixed it by
sudo npm install -g topojson
All the process were then successful.
Afterwhat my
topojson -o output.json input.shp
however, didn't worked.
Did topojson worked fine after your sudo install ?