I have a simple web project with a bower.json, package.json and a Gruntfile.js I have modified my .csproj file to add targets to run
npm install runs fine but it fails to run bower install. This is all that I have from the logs
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.
Here is what I am doing in the csproj definitio
<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>
Here is my 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"
}
I was able to hack past this issue by commenting out the bower install command in the .csproj file
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<!--<Exec Command="bower install" />-->
<Exec Command="dotnet bundle" />
</Target>
the bower install was failing because two modules that I was intalling depended on different versions of jQuery and could not find a resolution and wanted user input. Fixed it by providing a resolution section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With