【发布时间】:2015-10-16 17:45:30
【问题描述】:
我有以下wiredep 任务:
gulp.task('wiredep', function () {
log('Installing Bower Components in HTML files...)
return gulp
.src('./Views/Shared/_Layout.cshtml')
.pipe(wiredep({
bowerJson: require('./bower.json'),
directory: './bower_components/',
ignorePath: '../..'
}))
.pipe(gulp.dest('.'));
});
目标是转换
<!-- bower:js -->
<!-- endbower -->
到我的 bower.json 中指定的实际 JavaScript:
{
"name": "ASP.NET",
"private": true,
"dependencies": {
"bootstrap": "3.0.0",
"hammer.js": "2.0.4",
"jquery": "2.1.4",
"knockout": "3.3.0"
}
}
当我运行任务时,我得到以下输出:
[15:53:06] Starting 'wiredep'...
[15:53:06] Installing Bower Components in HTML files...
events.js:72
throw er; // Unhandled 'error' event
^
Error: Error: bootstrap is not installed. Try running `bower install` or remove the component from your bower.json file
我确实在 wwwroot/lib 中看到了这些软件包,所以我认为 Bower 实际上正在安装它。
谁能帮我解决这个问题?
【问题讨论】:
标签: visual-studio npm gulp bower asp.net-core