Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing /dist folder in Bower installation of Knockout 3.4.0 from Visual Studio 2015

I'm currently using Visual Studio 2015 to work on a project which is using NPM/Bower to manage the Javascript package dependencies. One of the packages we are using and have installed through Bower is knockout-3.4.0.

If I go to wwwroot/lib/knockout and delete the folder, VS Solution Explorer notices that a package is no longer installed under the dependencies node - if I then run Restore Packages from this menu it tries to pull knockout back into the lib directory.

However, each time it does this it fails to download the /dist directory and the file within it. If I do exactly the same thing on my colleagues machine behind me (very similar build environments) VS 2015 will restore the package including the /dist folder.

What am I doing wrong? I tried clearing out the bower cache and doing a re-install but got the same problems. Without the contents of /dist the application doesn't work.

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\Bower.cmd" install --force-latest
bower knockout#>=2.2        not-cached https://github.com/SteveSanderson/knockout.git#>=2.2
bower knockout#>=2.2           resolve https://github.com/SteveSanderson/knockout.git#>=2.2
bower knockout#>=2.2          checkout v3.4.0
bower knockout#>=2.2          resolved https://github.com/SteveSanderson/knockout.git#3.4.0
bower knockout#>=2.2           install knockout#3.4.0
like image 377
Gareth Avatar asked Jun 13 '16 11:06

Gareth


1 Answers

I experienced this problem and it was due to stale packages in the local bower cache.

I ran this command to clean the cache:

bower cache clean knockout

Then I was able to reinstall the knockout package without any trouble.

Thanks,

Brian Gehrs

like image 145
Brian Gehrs Avatar answered Oct 20 '22 19:10

Brian Gehrs