执行此命令后:
yo angular angular-app
我收到此错误消息:
/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/lib/detect-dependencies.js:84
if (_.isString(componentConfigFile.main)) {
^
TypeError: Cannot read property 'main' of undefined
at findMainFiles (/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/lib/detect-dependencies.js:84:37)
at /usr/local/lib/node_modules/generator-angular/node_modules/wiredep/lib/detect-dependencies.js:146:17
at forOwn (/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/node_modules/lodash/dist/lodash.js:1301:15)
at Function.forEach (/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/node_modules/lodash/dist/lodash.js:2595:9)
at detectDependencies (/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/lib/detect-dependencies.js:28:5)
at wiredep (/usr/local/lib/node_modules/generator-angular/node_modules/wiredep/wiredep.js:57:39)
at Generator._injectDependencies (/usr/local/lib/node_modules/generator-angular/app/index.js:326:5)
at /usr/local/lib/node_modules/generator-angular/node_modules/yeoman-generator/node_modules/async/lib/async.js:232:13
at /usr/local/lib/node_modules/generator-angular/node_modules/yeoman-generator/node_modules/async/lib/async.js:113:21
at /usr/local/lib/node_modules/generator-angular/node_modules/yeoman-generator/node_modules/async/lib/async.js:24:16
我使用的是Ubuntu 14.04。有人可以帮忙吗?
答案 0 :(得分:0)
我不确定是什么情况,但在使用以下命令后,我能够很好地运行它。
sudo npm cache clean
Ps。:您可能需要删除创建文件,运行上面的命令,然后尝试再次执行角度。