简体   繁体   English

yeoman角度发电机不会开始咕噜咕噜的服务

[英]yeoman angular generator wont start on grunt serve

When I set up the angular generator with yeoman I get this error after doing grunt serve 当我用自耕农设置角度生成器时,我在做了咕噜声后得到了这个错误

module.js:340

    throw err;
          ^
Error: Cannot find module './lexer'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/www/angMaps/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js:10:10)
    at Object.<anonymous> (/var/www/angMaps/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js:167:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

As @SteveBirkner already mentioned, delete the node_modules directory and run npm install command again. 正如@SteveBirkner已经提到的那样,删除node_modules目录并再次运行npm install命令。 It should work. 它应该工作。

I had the same problem, and in the end of the log I was receiving such a message: 我遇到了同样的问题,在日志的最后我收到了这样的消息:

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

The problem was the lack of enough memory in my VM. 问题是我的VM中缺少足够的内存。 One solution was to use swap is mentioned here . 一个解决方案是使用交换在这里提到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM