admin管理员组文章数量:1403187
When I use the mand: npm install -g bower
I get this error:
npm ERR! tar.unpack untar error /home/ec2-user/.npm/bower/1.3.12/package.tgz
npm ERR! Linux 3.14.20-20.44.amzn1.x86_64
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower" "-F"
npm ERR! node v0.10.34
npm ERR! npm v2.1.14
npm ERR! path /usr/local/lib/node_modules/bower
npm ERR! code EACCES
npm ERR! errno 3
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:46:53',
npm ERR! 'Object.onplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this mand again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ec2-user/var/www/html/npm-debug.log
When I use the mand: npm install -g bower
I get this error:
npm ERR! tar.unpack untar error /home/ec2-user/.npm/bower/1.3.12/package.tgz
npm ERR! Linux 3.14.20-20.44.amzn1.x86_64
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower" "-F"
npm ERR! node v0.10.34
npm ERR! npm v2.1.14
npm ERR! path /usr/local/lib/node_modules/bower
npm ERR! code EACCES
npm ERR! errno 3
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:46:53',
npm ERR! 'Object.onplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this mand again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ec2-user/var/www/html/npm-debug.log
Share
Improve this question
edited Dec 18, 2014 at 21:27
Anthony Forloney
91.9k14 gold badges118 silver badges116 bronze badges
asked Dec 18, 2014 at 21:25
James MercerJames Mercer
1113 silver badges10 bronze badges
3
-
1
Have you tried running the mand with
sudo
? – Anthony Forloney Commented Dec 18, 2014 at 21:27 - A help window just pops up that tells me how to use npm. – James Mercer Commented Dec 18, 2014 at 21:31
- Forgot to put install, thanks it worked – James Mercer Commented Dec 18, 2014 at 21:33
2 Answers
Reset to default 6You need to either run the mand using sudo
or run the mand normally as a user who has privileges to write to /usr/local/lib
.
sudo npm install -g bower
This line gives a lot of insight:
npm ERR! Please try running this mand again as root/Administrator.
As Anthony mentioned, try using sudo npm install bower -g
.
本文标签: javascriptnpm install g bower on AWS Amazon ami getting errorStack Overflow
版权声明:本文标题:javascript - npm install -g bower on AWS Amazon ami getting error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744356034a2602309.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论