Reputation: 7207
Using Angular template of VS 2017, I created a project.
Then when I tried to build it, it showed this message in the output window:
Build delayed until Bower/npm packages finish restoring.
And the problem is that it's stuck in this state for hours. I checked and noticed that the solution folder's size is not increased. I also checked my internet usage and there is no send or receive.
VS version: Visual Studio Community 2017 15.5.2
What should I do?
Upvotes: 5
Views: 5703
Reputation: 206
For anyone hopeless, if you wait a looooong time (for me it was like 10 minutes), eventually the build finishes. The problem is that every first time you try to build/run your project after opening Visual Studio you will need to wait this amount of time.
Upvotes: 0
Reputation: 564
Long time ago, I faced the same problem, the quickest fix is to go in the folder location with terminal and type:
npm install
Long time ago, I wrote an article about it: https://medium.com/@roberturturica/npm-bower-install-in-visual-studio-core-c9e370a59e87
Upvotes: 0
Reputation: 999
I faced the same problem. Even all the nuget packages were downloaded but still VS was showing the "Build delayed until Bower/npm packages finish restoring." message forever while building. Below steps solved it for me -
Hope this will help someone facing the same issue.
Upvotes: 0
Reputation: 21
The following worked for me:
Upvotes: 2
Reputation: 4076
For my changing the project directory and then cleaning the solution works.
Upvotes: 0
Reputation: 28180
What I did:
bin
and obj
folders completely (not just a clean build/rebuild)1.Try this and see if it helps.
Not 100% sure if that was the exact trigger, "Dependencies -> npm" in solution explorer was also complained about node-sass not being installed (and node_modules/node-sass
was not present). Running yarn
did not install anything because it thought it already was installed (because it was listed in packages.json and yarn.lock). Installing a newer version of node-sass populated node_modules/node-sass. So it might also be a problem that is solved by running
find . -name node_modules -print \
| grep -v /node_modules/.*/node_modules \
| tr '\012' '\000' | xargs -0 rm -r
1
From a git bash prompt: find . -name node_modules -prune -o -iname bin -print0 -o -iname bin -print0 | xargs -0 --no-run-if-empty rm -r
Upvotes: 2