Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Project build halts on: "Build delayed until Bower/npm packages finish restoring."

In VS 2017, I created a new ASP.NET Core Web Application using the Angular template.

The project however does not run, it gets stuck on:

Build delayed until Bower/npm packages finish restoring.

I see that a background task is running, but this goes on for ever and doesn't make any progress.

"Restoring npm packages" goes on forever

like image 387
Steven Lemmens Avatar asked Apr 15 '18 11:04

Steven Lemmens


2 Answers

I had a similar problem and I followed the below steps to get around it.

Disable Package restore:

  1. Go to Tools -> Options -> Project and Solutions -> Web Package Management -> Package Restore.
  2. Set False to 'Restore on Project Open' and 'Restore on Save'

After disabling, I opened a terminal and manually installed all the packages. I used Yarn to install the packages and faced no problems.

Visual Studio often halts during project builds because of timeouts. To get around that, I used the command yarn --network-timeout 60000.

Hope this helps!

like image 179
Harini P Avatar answered Nov 13 '22 11:11

Harini P


i had a sort-a-like problem. This is what i did to solve it:

  1. check the folder node_modules
  2. on my pc it was empty
  3. open the folder in a command prompt (with administrator privileges)
  4. run "npm install", this will download all referenced node modules (see package.json) to your pc
  5. then when you build in VS Studio,the bower delay is gone
like image 6
Ben Croughs Avatar answered Nov 13 '22 12:11

Ben Croughs