8

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...)

Natalie Perret
  • 8,013
  • 12
  • 66
  • 129
  • Hi. Have you solved this? – Monochromie Jun 29 '18 at 08:20
  • Kinda, but don't remember how, pass 3 months and my brain starts to flush pretty much everything ;-) plus I've stopped using VS, I am a fervent defender of VS Code and Rider now. Are you facing this issue @Monochromie right now? – Natalie Perret Jun 29 '18 at 08:23
  • Yeah. My problem is in proxy settings in .npmrc file. When I disable it - everything is fine – Monochromie Jun 30 '18 at 10:44
  • 1
    I had the same issue. A workaround is to call a bat file in the prebuild step, the bat file uses this 'Msbuild.exe ".\my.proj", then the proj file uses exec to call the comment. I don't know why this works and the other doesn't and it's a hack so I didn't add this as an answer – tony Aug 08 '18 at 14:17

0 Answers0