我有一个简单的 Web 项目,其中包含 bower.json、package.json 和 Gruntfile.js 我已经修改了我的 .csproj 文件以添加要运行的目标
- npm 安装
- 凉亭安装
- 咕噜声构建
npm install 运行良好,但无法运行 bower install。这就是我从日志中得到的全部
node_modules\.bin\bower cache clean
node_modules\.bin\bower install
C:\a\src\TestProj\TestProj\TestProj.csproj(137,5): error MSB3073: The command ".\node_modules\.bin\bower install" exited with code 1.
这是我在 csproj 定义中所做的
<Target Name="BeforeBuild">
<Exec Command="npm cache clean" />
<Exec Command="npm install" />
<Exec Command="node_modules\.bin\bower cache clean" />
<Exec Command="node_modules\.bin\bower install" />
</Target>
这是我的 bower.json
"name": "TestProj",
"version": "0.0.1",
"description": "",
"main": "index.html",
"moduleType": [
"amd"
],
"authors": [
"Sujesh Arukil"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"devDependencies": {
"knockoutjs": "~3.2.0"
}