[英]grunt Cannot find module 'coffee-script'
我使用以下命令安装平均堆栈并创建应用程序:
> 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
但是当我到达最后的grunt命令时,我得到错误:
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)
我在stackoverflow上尝试了各种解决方案但无济于事:
我也清除了npm缓存并重新安装了几次。
node_modules
目录。 npm cache clean
以清空下载的临时依赖项,以防万一。 npm install
再次npm install
,最好不要在运行时中断它。 这些解决了我的大部分问题。
这对我有用:
npm install --save-dev coffee-script
node -v # v0.10.31
我遇到了同样的问题,在日志的最后我收到了这样的消息:
...
http 200 http://registry.npmjs.org/-/all
Killed
问题是我的VM中缺少足够的内存。 一个解决方案是使用交换在这里提到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.