我試圖讓Yeoman工作,但它一直在一個接一個的牆上。感謝上帝的stackoverflow和所有你很好的人幫助。無論如何...運行`yo angular`時出現了大量的「npm ERR!」#
我一直試圖運行yo angular
。但我發現了一堆npm ERR!
包括:
npm ERR! Please try running this command again as root/Administrator.
既然不能用喲sudo的,我跟着大多接受的建議,改變了一些配置,希望解決這個問題。 Here are the commands I ran,它們基於the recommendation。
但我仍然收到同樣的錯誤!
這是我yo angular
的npm-debug.log
這是我yo angular
的stderr.log
這是我yo angular
的stdout.log
我應該如何解決這些錯誤?
非常感謝你提前。
更新:
做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
UPDATE2:一些research後,我解決了這個新ENOENT問題sudo npm cache clear
。
感謝StackOverflow。
亞歷喜,謝謝!這是非常有用的,但是,我現在有新的錯誤(請參閱問題更新) – randwa1k
這將是另一個問題,我真的不知道該答案 – alex