Anybody know how to fix this?
/Users/foo $npm install -g bower
npm http request GET https://registry.npmjs.org/bower
npm http 200 https://registry.npmjs.org/bower
npm http fetch GET https://registry.npmjs.org/bower/-/bower-1.3.12.tgz
npm http fetch 200 https://registry.npmjs.org/bower/-/bower-1.3.12.tgz
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! path /Users/foo/.node/bin/bower
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, unlink '/Users/foo/.node/bin/bower'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, unlink '/Users/foo/.node/bin/bower'
npm ERR! errno: -13,
npm ERR! code: 'EACCES'
npm ERR! path: '/Users/foo/.node/bin/bower' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, unlink'/Users/foo/.node/bin/bower'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES, unlink '/Users/foo/.node/bin/bower']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/Users/foo/.node/bin/bower' }
``
npm ERR! Please include the following file with any support request:
npm ERR! /Users/foo/npm-debug.log
/Users/foo$echo $PATH
/Users/foo/.npm:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/mysql/bin
:/opt/X11/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
Have you tried running it as Root user? try
sudo npm install -g bower
The npm ERR! code EACCES usually results because it didn't have permission to access a necessary folder or file
Related
I have this come back in the terminal. Did have gulp previously, so not sure why it's not being found when inputting "gulp -v"
$ npm install -g gulp
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! node v4.2.6
npm ERR! npm v2.14.12
npm ERR! path /usr/local/lib/node_modules/gulp
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall rmdir
npm ERR! Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/gulp'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/gulp']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rmdir',
npm ERR! path: '/usr/local/lib/node_modules/gulp' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/gulp'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/gulp']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back syscall: 'rmdir',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/gulp' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/applesandoranges0609/npm-debug.log
To install the Gulp command line utility you have to run
npm i -g gulp-cli
not just gulp. That's the dependency that should be added to projects so you can run gulp from the projects node_modules folder instead.
When i am trying to install package i'm getting this error. In addition all other packages were installed without any problems. How could i solve this. If i'm changing flag to -g (globally) it works, but i need it to be in my project
npm install --save express-validator
npm http GET https://registry.npmjs.org/express-validator
npm http 304 https://registry.npmjs.org/express-validator
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/validator
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/validator
npm http GET https://registry.npmjs.org/types/bluebird
npm http GET https://registry.npmjs.org/types/express
npm http 404 https://registry.npmjs.org/types/bluebird
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107: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 Linux 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "express-validator"
npm ERR! cwd /home/prog/work/appJS
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm http 404 https://registry.npmjs.org/types/express
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107: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 Linux 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "express-validator"
npm ERR! cwd /home/prog/work/appJS
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/prog/work/appJS/npm-debug.log
npm ERR! not ok code 0
This occurs when ur npm version is down or the library has been removed.
you need to update your npm version...!!
npm update npm#latest
I can't seem to install bower properly. I don't know what's wrong, but it keeps throwing these errors. Can someone help?
npm ERR! tar.unpack untar error /Users/Jeanwoo/.npm/bower/1.4.1/package.tgz
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! path /usr/local/lib/node_modules/bower
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/bower']
npm ERR! errno: -13,
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:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:95:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Jeanwoo/npm-debug.log
I'm assuming the command you're running is npm install -g bower (to install Bower globally on your machine).
The error
Please try running this command again as root/Administrator
...makes me think you should try running as root:
sudo npm install -g bower
And then input your password and it should install. If not, what is the command you're running?
I get this error when I run the command "npm install -g yo bower grunt-cli gulp".
Does any one know what the problem is?
npm ERR! tar.unpack untar error /Users/??????/.npm/grunt-cli/0.1.13/package.tgz
npm ERR! tar.unpack untar error /Users/??????/.npm/yo/1.4.7/package.tgz
npm ERR! tar.unpack untar error /Users/??????/.npm/gulp/3.9.0/package.tgz
npm ERR! tar.unpack untar error /Users/??????/.npm/bower/1.4.1/package.tgz
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "yo" "bower" "grunt-cli"
"gulp"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path /usr/local/lib/node_modules/grunt-cli
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/grunt-cli'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/grunt-cli']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/grunt-cli',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/grunt-cli',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:95:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/??????/npm-debug.log
As Vohuman pointed out, running this as sudo would fix it. You're trying to install the packages globally which requires access to /usr/local which you don't have write privileges to, so as the error message says, please try running this command again as root/Administrator.
Even "logged in" as root (sudo su) [ On CentOS ]
sudo npm install -g ...
Otherwise was still executing as user, possibly the directory owner?
I am trying to install bower on a vagrant machine using following command
npm install -g bower
but i am getting following error
npm WARN prefer global bower#1.3.2 should be installed with -g
npm http GET https://registry.npmjs.org/bower
npm http 200 https://registry.npmjs.org/bower
[4mRunning "watch" task[24m
Waiting...npm http GET https://registry.npmjs.org/bower/-/bower-1.3.2.tgz
npm http 200 https://registry.npmjs.org/bower/-/bower-1.3.2.tgz
npm ERR! Error: EACCES, mkdir '/usr/lib/node_modules/bower'
npm ERR! { [Error: EACCES, mkdir '/usr/lib/node_modules/bower']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/lib/node_modules/bower',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/lib/node_modules/bower',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/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 Linux 3.2.0-23-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "bower" "--no-bin-links"
npm ERR! cwd /vagrant
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /usr/lib/node_modules/bower
npm ERR! fstream_path /usr/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/lib/node_modules/bower'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/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! /vagrant/npm-debug.log
npm ERR! not ok code 0
/tmp/vagrant-shell: line 44: bower: command not found
It seems that bower is not simplly gets installed on a windows machine.
Please help in issue.
Any help will be appericiated.
You need root access for global install.
sudo npm install -g bower