很多"!NPM ERR"运行时,'哟angular`Ş [英] Lots of "npm ERR!"s when running `yo angular`
问题描述
我试图让约曼的工作,但它已经一面墙层出不穷。感谢上帝,计算器和你很好的人帮忙。反正...
我一直在试图运行哟角
。 !但我发现了一堆 NPM ERR的
包括:
NPM ERR!请重试运行此命令,作为根/管理员。
既然不能哟使用sudo,我跟着大多是接受建议,改变了一些配置,希望解决这个问题。 下面是我跑了命令,这是基于的推荐。
但我仍然得到同样的错误!
下面是我的哟角
的 NPM- 的debug.log
下面是我的哟角
的标准错误。登录
下面是我的哟角
的标准输出。登录
我应该如何修复这些错误?
感谢你这么多提前。
更新:
做的亚历克斯的建议须藤CHOWN的ubuntu的/ home / Ubuntu的/ tmp目录-rv
,运行作为root错误都消失之后,但是我仍然在运行后,这些错误哟角
在新目录中。我与猫-n stderr.log显示错误| grep的-ir ERR
(这是奇怪的是, NPM-的debug.log
未生成这个时候):
218 NPM ERR!错误:ENOENT,LSTAT'/home/ubuntu/youtube_5/node_modules/grunt/lib/grunt/task.js
219 NPM ERR!如果您需要帮助,您可能会报告该* *整个日志,
220 NPM ERR!包括故宫和节点版本,网址为:
221 NPM ERR! < HTTP://github.com/npm/npm/issues>
223 NPM ERR! Linux系统3.2.0-54虚
224 NPM ERR!命令节点,在/ usr / local / bin目录/故宫,安装,咕噜 - 卡玛,卡玛NG-html2js- preprocessor报应-NG-情景--save-dev的
225 NPM ERR! CWD /家庭/ Ubuntu的/ youtube_5
226 NPM ERR!节点-v v0.10.25
227 NPM ERR! NPM -v 1.4.2
228 NPM ERR!路径/home/ubuntu/youtube_5/node_modules/grunt/lib/grunt/task.js
229 NPM ERR! fstream_path /home/ubuntu/youtube_5/node_modules/grunt/lib/grunt/task.js
230 NPM ERR! fstream_type文件
231 NPM ERR! fstream_class的FileWriter
232 NPM ERR! code ENOENT
233 NPM ERR!错误号34
234 NPM ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
235 NPM ERR! fstream_stack Object.oncomplete(fs.js:107:15)
1102 NPM ERR!
1103 NPM ERR!其他记录详细信息可以发现:
1104 NPM ERR! /home/ubuntu/youtube_5/npm-debug.log
1105 NPM ERR!不正常code 0
UPDATE2:经过一番研究,我解决了这个新的ENOENT问题 sudo的NPM缓存清理
。
感谢StackOverflow的。
80错误错误:EACCES,MKDIR'/家庭/ Ubuntu的/ tmp目录/ NPM-26883-sBYbfAy6
块引用>好了,所以你的
/家庭/ Ubuntu的/ tmp目录
有错误的权限。这是因为您过去那样sudo的NPM安装
和NPM不处理这不够好。运行
须藤CHOWN的ubuntu的/ home / Ubuntu的/ tmp目录-rv
来解决这个问题,或者只是删除该文件夹。I'm trying to get Yeoman to work but it's been one wall after another. Thank God for stackoverflow and all you nice people helping out. Anyways ...
I've been trying to run
yo angular
. But I'm getting a bunch ofnpm ERR!
including:npm ERR! Please try running this command again as root/Administrator.
Since I can't use sudo on yo, I followed the mostly accepted advice and changed some configuration hoping to fix this problem. Here are the commands I ran, which were based on the recommendation.
But I'm still getting the same error!
Here is my
yo angular
's npm-debug.logHere is my
yo angular
's stderr.logHere is my
yo angular
's stdout.logHow should I fix these errors?
Thank you so much in advance.
Update:
After alex's suggestion of doing
sudo chown ubuntu /home/ubuntu/tmp -Rv
, the run as root error did go away, however I still have these errors after runningyo angular
in a new directory. I'm displaying the errors withcat -n stderr.log | grep -ir err
(it's strange thatnpm-debug.log
wasn't generated this time):218 npm ERR! Error: ENOENT, lstat '/home/ubuntu/youtube_5/node_modules/grunt/lib/grunt/task.js' 219 npm ERR! If you need help, you may report this *entire* log, 220 npm ERR! including the npm and node versions, at: 221 npm ERR! <http://github.com/npm/npm/issues> 223 npm ERR! System Linux 3.2.0-54-virtual 224 npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-karma" "karma-ng-html2js-preprocessor" "karma-ng-scenario" "--save-dev" 225 npm ERR! cwd /home/ubuntu/youtube_5 226 npm ERR! node -v v0.10.25 227 npm ERR! npm -v 1.4.2 228 npm ERR! path /home/ubuntu/youtube_5/node_modules/grunt/lib/grunt/task.js 229 npm ERR! fstream_path /home/ubuntu/youtube_5/node_modules/grunt/lib/grunt/task.js 230 npm ERR! fstream_type File 231 npm ERR! fstream_class FileWriter 232 npm ERR! code ENOENT 233 npm ERR! errno 34 234 npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26 235 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 1102 npm ERR! 1103 npm ERR! Additional logging details can be found in: 1104 npm ERR! /home/ubuntu/youtube_5/npm-debug.log 1105 npm ERR! not ok code 0
Update2: After some research, I solved this new ENOENT problem with
sudo npm cache clear
.Thanks StackOverflow.
解决方案80 error Error: EACCES, mkdir '/home/ubuntu/tmp/npm-26883-sBYbfAy6'
Okay, so your
/home/ubuntu/tmp
has wrong permissions. It happened because you didsudo npm install
in the past, and npm doesn't handle this well enough.Run
sudo chown ubuntu /home/ubuntu/tmp -Rv
to fix this issue, or just delete that folder.这篇关于很多&QUOT;!NPM ERR&QUOT;运行时,'哟angular`Ş的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!