我用 Yo 角度发生器构建了一个 Angular 应用程序,
我正在使用 Grunt Build 构建应用程序,然后我添加了 Bootstrap 3 和 npm install grunt-bower-install
我将这些行添加到 Grunt 文件中
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'
],
}
},
但是我已经删除了这些行!
现在 Grunt Build 抛出这个错误
Running "bowerInstall:app" (bowerInstall) task
Warning: Cannot read property 'main' of undefined Use --force to continue.
Aborted due to warnings.
我知道该怎么做,甚至知道从哪里开始?