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?
Related
I tried to install and use npm in two ways, but I get only errors.
Installing npm by normal way:
vagrant#precise64:~$ npm install
npm ERR! Couldn't read dependencies.
npm ERR! Error: ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /home/vagrant/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/home/vagrant/package.json'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
Trying to install latest version:
vagrant#precise64:~$ npm install -g npm#latest
npm http GET https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vagrant/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: npm
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vagrant/npm-debug.log
npm not ok
What should I install before to create this package.json file ane make it work?
npm looks like it's already installed. Go to your project root and:
npm init
It'll walk you through making a package.json file, then you can
npm i whateverpackageyouwant
to your heart's content.
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?
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
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
on my Ubuntu. I tried installing the browser plugin from chrome just as the website says to execute.
npm install dalek-browser-chrome --save-dev
problem is I get this error when running the command.
> dalek-browser-chrome#0.0.9 install /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome
> node install.js
Chromedriver installation failed Error: EACCES, permission denied '/home/monece/tmp/chromedriver'
at Object.fs.mkdirSync (fs.js:642:18)
at mkdir (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:156:8)
at Promise._successFn (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:177:7)
at Promise._withInput (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:248:25)
at Promise._chainPromise (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:290:13)
at Promise.then (/home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/kew/kew.js:154:13)
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/install.js:175:23
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/npmconf/npmconf.js:76:7
at Array.forEach (native)
at /home/monece/Desktop/dalekjs/node_modules/dalek-browser-chrome/node_modules/npmconf/npmconf.js:75:13
npm ERR! dalek-browser-chrome#0.0.9 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dalek-browser-chrome#0.0.9 install script.
npm ERR! This is most likely a problem with the dalek-browser-chrome package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls dalek-browser-chrome
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-15-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "dalek-browser-chrome" "--save-dev"
npm ERR! cwd /home/monece/Desktop/dalekjs
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/monece/Desktop/dalekjs/npm-debug.log
npm ERR! not ok code 0
p.s. I also tried using sudo npm install and it still doesnt not work