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

2

6

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
Alben answered 13/6, 2016 at 11:48 Comment(0)
F
4

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

Folie answered 9/8, 2016 at 14:58 Comment(1)
+1, this solved it for me as well. Important note: after clearing the cache, I had to uninstall Knockout package (bower uninstall knockout), then install it again before the new package showed up.Isogamete
A
0

This problem appears to have been caused by pointing our application to look at knockoutjs instead of knockout in Bower scripts

Alben answered 13/6, 2016 at 13:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.