npm hangs when called in Visual Studio prebuild events

1.6k views Asked by At

Why when running the commands below in the cmd (and the current directory being the root of my visual studio project), everything is okay :

npm install
webpack --config webpack.config.vendor.js
webpack

But when asking to run that in my ASP.NET Core 2.0 with Visual Studio 2017 it hangs on the first line (while it does not require any user input).When I am saying it hangs, it hangs for about 3-5min (after executing the last line using call), like doing literally.

I managed to get a bit further by using call on each of them (which is suggested by the MS documentation for calling .bat scripts):

call npm install
call webpack --config webpack.config.vendor.js
call webpack

For some reasons it works and hangs only on the last line.

When trying out something simple like echo there everything is fine, I don't really get what is wrong with the lines above.

[EDIT] ALready checked that out npm hangs on any command

But my issue seems to be different since it can run cmd and PowerShell (but hangs whenever it is run in an ISE PowerShell tab...)

0

There are 0 answers