aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
258 stars 124 forks source link

PrepublishScript can't find npm install #1016

Closed natelaff closed 7 years ago

natelaff commented 7 years ago

Don't know where to put this, so going here since it was the upgrade process that got me here.

Had an ASP.net core app that I created with beta tooling. After upgrading to 2017 my pre-publish to Azure script no longer works. Should the upgrade of handled this differently or do I need to make a manual change?

AndreiGorlov commented 7 years ago

Same here. Looks like VS doesn't take into account "External Web Tools" settings.

natelaff commented 7 years ago

Have you found a workaround yet?

I tried adding C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Web\External to system PATH variable, but that doesn't work.

I also tried adding that path directly to External Web Tools settings, thinking maybe the VSINSTALLDIR variable might be having issues, but I think you're right, those paths aren't searched. At least not during PrePublishScript

natelaff commented 7 years ago

Reported here: https://developercommunity.visualstudio.com/content/problem/29113/prepublishscript-does-not-look-to-external-web-too.html

AndreiGorlov commented 7 years ago

Have you found a workaround yet?

Adding C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Web\External;.\node_modules\.bin to PATH works for me.

natelaff commented 7 years ago

Ah, cool. That seems to patch it for now. Thank you! Dig you get the gulp command working though? Works via Task Runner, but not Prepublish

AndreiGorlov commented 7 years ago

gulp works with .\node_modules\.bin in PATH.

Also check #1017

natelaff commented 7 years ago

That's what I thought but gulp kept failing. Closed and re-opened VS after adding those to PATH and now we're good. Not the most stable version in recent history it seems! Thanks, man!

mlorbetske commented 7 years ago

Per https://github.com/aspnet/Tooling/issues/1017#issuecomment-286079730, this is tracked by https://github.com/dotnet/cli/issues/5498 and https://github.com/aspnet/websdk/issues/114, closing this here since it's being tracked on those repos

AndreiGorlov commented 7 years ago

@mlorbetske It's separate issue not related to dotnet/cli#5498 and aspnet/websdk#114