Reputation: 7899
For simplicity I am focusing one just one bower-installed library, but it doesn't load any bower-installed package under /lib
Project works fine under Windows, but it doesn't find bower-installed backages under Linux.
Chrome shows this error:
GET http://localhost:5000/lib/pikaday/pikaday.js
404 not found
In the view:
<script src="/lib/pikaday/pikaday.js"></script>
I have my bower.json
in the solution:
{
"name": "asp.net",
"private": true,
"dependencies": {
"bootstrap": "3.3.6",
"jquery": "2.2.0",
"jquery-validation": "1.14.0",
"jquery-validation-unobtrusive": "3.2.6",
"handsontable": "0.24.3"
}
}
(pickaday.js
is part of the handsontable
package)
How can I make dotnet run
/ dotnet build
/ dotnet publish
on linux include those bower packages?
Upvotes: 0
Views: 418
Reputation: 7899
As user Baklap4 mentioned in the comments, it needs to run bower install
so it retrieves the dependencies via npm (it's not done automatically as in Visual Studio).
Of course you need Bower installed first (otherwise on dotnet publish
you will get the error "'bower' is not recognized as an internal or external command"):
npm install -g bower
Running that in Ubuntu, I encountered this other problem:
bower install
/usr/bin/env: node: No such file or directory
The solution can be found here, which is adding a logical link in linux:
ln -s /usr/bin/nodejs /usr/bin/node
Finally, repeat:
bower install
Upvotes: 1