2014-05-25 197 views
2

我建一個角度應用程序與呦角genertor工作,咕嚕籌建不育角

我是建設有咕嚕應用構建精細,然後我加引導3,也NPM安裝咕嚕鮑爾安裝

我添加這些行繁重的文件

module.exports = function (grunt) { 


    require('load-grunt-tasks')(grunt); 

    require('time-grunt')(grunt); 

    //ADDED THIS LINE 
    grunt.loadNpmTasks('grunt-bower-install'); 

    grunt.initConfig({ 

    yeoman: { 
     // configurable paths 
     app: require('./bower.json').appPath || 'app', 
     dist: 'dist' 
    }, 
    //ADDED THESE LINES 
    'bower-install': { 
     target: { 
      src: [ 
       'app/index.html' 
      ], 

      } 
     }, 

但是我已經刪除了這些線!

現在咕嚕打造的是引發此錯誤

Running "bowerInstall:app" (bowerInstall) task 
Warning: Cannot read property 'main' of undefined Use --force to continue. 

Aborted due to warnings. 

我不知道該怎麼辦,甚至從哪裏開始?

回答

1

在我的自耕農生成的項目這個任務看起來像:

'bower-install': { 
    app: { 
    html: '<%= yeoman.app %>/index.html', 
    ignorePath: '<%= yeoman.app %>/' 
    } 
}, 

在較新的版本,而不是html使用src

'bowerInstall': { 
    app: { 
    src: ['<%= yeoman.app %>/index.html'], 
    ignorePath: '<%= yeoman.app %>/' 
    } 
}, 

也許你使其適應你的情況。雖然我認爲它應該沒有改變就行。

但是你幾乎一樣,所以也許在另一個地方的問題。

0

我找到了答案,

我只是需要運行安裝鮑爾,

+1

哈,想過。 – zishe

+0

只用了幾天的涼亭:) –