[英]Yeoman angular generator error
When I'm using the angular yeoman generator, I'm getting the following error: 当我使用角度Yeoman发生器时,出现以下错误:
module.js:340
throw err;
^
Error: Cannot find module './lib/pack.js'
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> (C:\Users\kra\AppData\Roaming\npm\node_modules\generator-karma\node_modules\yeoman-generator\n
ode_modules\download\node_modules\decompress\node_modules\decompress-tarbz2\node_modules\tar\tar.js:171:16)
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)
at Module.require (module.js:364:17)
Any idea why? 知道为什么吗?
npm version 1.4.28 npm版本1.4.28
node version 0.10.33 节点版本0.10.33
yeoman version 1.3.3 约曼版本1.3.3
尝试删除您的generator-karma
和generator-angular
,运行npm cache clean
,然后再次安装它们
I just had a similar issue, this might not be the solution but your version of npm is out of date, try typing: 我只是遇到了类似的问题,这可能不是解决方案,但您的npm版本已过时,请尝试输入:
sudo npm install npm -g
As referenced On the npm website (note they use sudo in the example but it might not be necessary). 如npm网站上所引用(请注意,在示例中,他们使用sudo,但可能没有必要)。 after that:
之后:
npm --version
Is currently 2.1.12 so it should be higher than that. 当前为2.1.12,因此应该高于该值。
You can then try: 然后,您可以尝试:
npm update
to upgrade everything to the latest version ( See this page ). 将所有内容升级到最新版本( 请参见本页 )。
This may solve the problem. 这样可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.