咕噜不能find模块'咖啡脚本'

我使用下面的命令来安装平均堆栈并创build一个应用程序:

> sudo npm install -g meanio@latest // Get the mean cmdline > mean init myApp // create your first app > cd myApp && npm install // Install dependencies > grunt // Launch mean 

但是当我到达最后的咕噜声命令时,我得到错误:

module.js:333 throw err; ^ Error: Cannot find module 'coffee-script' at Function.Module._resolveFilename (module.js:331:15) at Function.Module._load (module.js:273:25) at Module.require (module.js:357:17) at require (module.js:373:17) at Object.<anonymous> (/home/eddie/ResFour/node_modules/grunt/lib/grunt.js:16:1)

我已经尝试了各种解决scheme在stackoverflow无济于事:

NodeJS – 设置mean.io无法find模块错误

找不到模块'coffee-script'

我也清除npmcaching并重新安装了几次。

  1. 删除node_modules目录。
  2. npm cache clean清空下载的临时依赖,以防万一。
  3. npm install再次npm install ,最好不要在运行时中断它。

这些解决了我的大部分问题。

这对我工作:

 npm install --save-dev coffee-script node -v # v0.10.31 

我有同样的问题,在日志的最后,我收到了这样的信息:

 ... http 200 http://registry.npmjs.org/-/all Killed 

问题是我的虚拟机内存不足。 一个解决scheme是使用交换在这里提到。