我试图yo angular
在一个新的项目目录中运行,但它在途中的某个地方给了我 ENOENT 错误。是的,我看过这个类似的问题,但它的解决方案对我不起作用。
在运行之前,我在空的新项目目录上运行了这些东西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 Server 12.04.3 上运行的所有命令的历史记录,按时间顺序排列,因此您可以确切地看到导致这一点的原因,以及我安装了各种软件包的位置。
这个问题链接到一个 npm github 问题。