Yeoman:找不到模块' ./ dist / rx'

时间:2015-09-07 05:11:43

标签: node.js yeoman-generator-angular

所以我从我的Ubuntu运行 yo 命令,用yeoman安装Angular并收到此消息错误:

? 'Allo Jonathan! What would you like to do? Angular

Make sure you are in the directory you want to scaffold into.
This generator can also be run with: yo angular


     _-----_
    |       |    .--------------------------.
    |--(o)--|    |    Welcome to Yeoman,    |
   `---------´   |   ladies and gentlemen!  |
    ( _´U`_ )    '--------------------------'
    /___A___\    
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y ` 

Out of the box I include Bootstrap and some AngularJS recommended modules.

? Would you like to use Sass (with Compass)? No
? Would you like to include Bootstrap? Yes
? Which modules would you like to include? angular-animate.js, angular-cookies.js, angular-resource.js, angular-route.js, angular-sanitize.js, angular-touch.js
   create app/styles/main.css
   create app/index.html
   create bower.json
identical .bowerrc
   create package.json
   create Gruntfile.js
   create README.md
   invoke   angular:common:/usr/lib/node_modules/generator-angular/app/index.js
identical     .editorconfig
identical     .gitattributes
identical     .jshintrc
identical     .yo-rc.json
identical     .gitignore
   create     test/.jshintrc
   create     app/.buildignore
   create     app/.htaccess
   create     app/404.html
   create     app/favicon.ico
   create     app/robots.txt
   create     app/views/main.html
   create     app/images/yeoman.png
   invoke   angular:main:/usr/lib/node_modules/generator-angular/app/index.js
   create     app/scripts/app.js
   invoke   angular:controller:/usr/lib/node_modules/generator-angular/app/index.js
   create     app/scripts/controllers/main.js
   create     test/spec/controllers/main.js

     _-----_
    |       |    .-----------------------.
    |--(o)--|    |      Bye from us!     |
   `---------´   |       Chat soon.      |
    ( _´U`_ )    |      Yeoman team      |
    /___A___\    |    http://yeoman.io   |
     |  ~  |     '-----------------------'
   __'.___.'__   
 ´   `  |° ´ Y ` 

module.js:338
    throw err;
    ^
Error: Cannot find module './dist/rx'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/lib/node_modules/generator-karma/node_modules/yeoman-generator/node_modules/inquirer/node_modules/rx/index.js:1:72)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

我该怎么做才能解决问题? 我使用的是Ubuntu 14.04 x64。哟1.4.8,grunt-cli v0.1.13,npm 2.11.3,节点v0.12.7,凉亭1.5.2

1 个答案:

答案 0 :(得分:2)

请按照Ubuntu Syatem中的步骤进行操作。

<强> 1。尝试升级到最新的npm。 (这将使用npm本身更新npm:)

sudo npm install npm -g

如果您遇到困难,请尝试:

sudo npm update npm -g.

<强> 2。如果上述步骤无效,请尝试以下代码:

npm cache clear && npm install -gf yo && npm install -gf generator-provide_your_generator_name_here

希望它可以帮助你解决问题。

相关问题