I am facing an issue of
The command "bower install" exited with code 9009
while publishing the ASP.NET core-MVC application with entity framework. I am using VS-2017.
I got many suggestions in your portal of downloading node.js
globally, but as I am very new to this system I don't know how to do so. Or
if there is any other solution for that please let me know.
Install bower globally by executing the following command in cmd:
npm install -g bower
Close Visual Studio, then open it and try again.
Also worked for me by removing the code below in the project file.
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="bower install" />
<Exec Command="dotnet bundle" />
However it did cause a couple of typescript issues with duplicate method names, add the below code to the tsconfig.json file
"exclude": [
"obj"
]
What worked for me.
I went to project file (in VS-2017 Explorer you can right-click it and edit it)
Then I deleted (or commented) the Target node
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="bower install" />
<Exec Command="dotnet bundle" />
</Target>
Everything was fine without installing anything else.
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