我正试图让约曼工作,但它是一堵又一堵墙。感谢上帝的 stackoverflow 和所有帮助的好人。无论如何 ...
我一直在努力奔跑yo angular
。但我得到了一堆,npm ERR!
包括:
npm ERR! Please try running this command again as root/Administrator.
由于我不能在 yo 上使用 sudo,所以我遵循了大多数接受的建议并更改了一些配置,希望能解决这个问题。以下是我根据建议运行的命令。
但我仍然遇到同样的错误!
这是我yo angular
的npm-debug.log
这是我yo angular
的stderr.log
这是我yo angular
的stdout.log
我应该如何修复这些错误?
非常感谢你。
更新:
在 alex 的建议之后,以 root 身份运行的错误确实消失了,但是在新目录中sudo chown ubuntu /home/ubuntu/tmp -Rv
运行后我仍然有这些错误。yo angular
我正在显示错误(这次没有生成cat -n stderr.log | grep -ir err
很奇怪):npm-debug.log
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
更新 2:经过一些研究,我解决了这个新的 ENOENT 问题sudo npm cache clear
。
感谢 StackOverflow。