【问题标题】:yo angular projectname Commandyo angular projectname 命令
【发布时间】:2015-09-05 04:57:48
【问题描述】:

我正在运行此命令并一个接一个地收到连续错误。 模块不存在。我安装了那个模块,它显示下一个模块不存在。例如:一个模块错误--->>

错误:找不到模块“shelljs” 在 Function.Module._resolveFilename (module.js:338:15) 在 Function.Module._load (module.js:280:25) 在 Module.require (module.js:364:17) 在需要 (module.js:380:17) 在对象。 (/home/bele/.nvm/v0.10.33/lib/node_modules/generator->angular/node_modules/yeoman-generator/lib/actions/user.js:2:13) 在 Module._compile (module.js:456:26) 在 Object.Module._extensions..js (module.js:474:10) 在 Module.load (module.js:356:32) 在 Function.Module._load (module.js:312:12) 在 Module.require (module.js:364:17)

【问题讨论】:

  • 您是如何设置项目的?您是否运行了所有安装步骤? npm install, bower install, grunt?我不确定这是否是 yo 项目设置的一部分,或者您是否必须手动运行它。
  • 我使用了 npm install --global generator-angular@0.11.1

标签: angularjs npm yo


【解决方案1】:

可能是你安装的旧版本

npm cache clean && npm upgrade -g yo

【讨论】:

  • 你用“-g”安装了角度生成器吗?
  • npm install --global generator-angular@0.11.1
【解决方案2】:

为了节省开支,我还将更新所有相关工具: npm update -g npm yo bower grunt

有时 bower 无法在第一次下载所有依赖项,需要再次运行 bower install

【讨论】:

    猜你喜欢
    • 2014-07-24
    • 1970-01-01
    • 1970-01-01
    • 2015-07-20
    • 1970-01-01
    • 2014-01-19
    • 2016-02-02
    • 2016-10-30
    • 2016-05-04
    相关资源
    最近更新 更多