我想在一個新的項目目錄中運行yo angular
,但它的地方給我的ENOENT錯誤一路走來。是的,我查看了this similar question,但其解決方案對我無效。`yo angular`給出錯誤:npm ERR!代碼ENOENT npm ERR!錯誤號34(是的,我已經清理緩存和設置.npmignore)
我向右走yo angular
前跑空的新項目目錄這些事情:
touch .npmignore
npm cache clear
npm cache clean
但我仍然得到:
npm ERR! Error: ENOENT, lstat '/home/ubuntu/app_c/node_modules/grunt/ internal-tasks/bump.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/ npm" "install"
npm ERR! cwd /home/ubuntu/app_c
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /home/ubuntu/app_c/node_modules/grunt/internal-tasks/bump. js
npm ERR! fstream_path /home/ubuntu/app_c/node_modules/grunt/internal- tasks/bump.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/ node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
我怎樣才能解決這個問題?
這是一個全新的Ubuntu服務器12.04.3的history of ALL the commands, in chronological order, that I ran,所以你可以看到究竟是什麼導致了這一點,並在那裏我已經安裝了各種包。
這個問題是鏈接到NPM github issue。
'npm cache clean'後嘗試重新安裝喲。 –
在'npm cache clean'後的新目錄中,我做了'npm install -g yo'和'npm install -g generator-angular'。在運行'yo angular'之前,'npm cache clean'又做了。我仍然得到ENOENT。 – randwa1k
我剛剛有嚴格相同的問題。 「npm update -g」爲我解決了這個問題。 –