Closed sinellil closed 7 years ago
BUMP I'm having this issue too!
Check your visual studio nodejs version. This was causing me error when trying to run the ng cli. I upgraded the version to what I have on my system. This was where it was located for my vs2015 install. C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External
Hope this helps.
I believe Node.js v5.4.1 and npm v3.3.4 were bundled with both VS 2015 Update 3 and VS 2017 RTM. More than likely, these aren't the versions you want to use. I HIGHLY recommend installing Node.js v6.x or v7.x and then configuring VS to use that version instead.
Follow the steps documented here to configure VS 2015. For VS 2017, follow these instructions:
$(PATH)
entry to the 2nd position in the list by using the up arrow button.Thank you for reminding me of that little tidbit... I thought I had done that however, it seems that I hadn't.
@sinellil Did that fix the issue?
Yes it did, thanks for the help! Apologies that it was something you'd already came across and responded to.
This is still an issue even after adjusting the external tools to use the path before internal tools.
Installed product versions Visual Studio: Enterprise 2017 15.7.2 This extension: 1.4.81
System path should take precedence
Node is installed independently of VS...
...but it's not being used.
Output from NPM Task Runner
C:\Dev\NPMTaskRunner\NPMTaskRunner> cmd.exe /c npm run versionAndPathTest --color=always
> npmtaskrunner@1.0.0 versionAndPathTest C:\Dev\NPMTaskRunner\NPMTaskRunner
> npm run printNPMVersion & npm run xcopyLocation
> npmtaskrunner@1.0.0 printNPMVersion C:\Dev\NPMTaskRunner\NPMTaskRunner
> npm -v
3.3.4
> npmtaskrunner@1.0.0 xcopyLocation C:\Dev\NPMTaskRunner\NPMTaskRunner
> where xcopy
'where' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Web\\External\\Node.exe" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js" "run" "xcopyLocation"
npm ERR! node v5.4.1
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! npmtaskrunner@1.0.0 xcopyLocation: `where xcopy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the npmtaskrunner@1.0.0 xcopyLocation script 'where xcopy'.
npm ERR! This is most likely a problem with the npmtaskrunner package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! where xcopy
npm ERR! You can get their info via:
npm ERR! npm owner ls npmtaskrunner
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Dev\NPMTaskRunner\NPMTaskRunner\npm-debug.log
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Web\\External\\Node.exe" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js" "run" "versionAndPathTest" "--color=always"
npm ERR! node v5.4.1
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! npmtaskrunner@1.0.0 versionAndPathTest: `npm run printNPMVersion & npm run xcopyLocation`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the npmtaskrunner@1.0.0 versionAndPathTest script 'npm run printNPMVersion & npm run xcopyLocation'.
npm ERR! This is most likely a problem with the npmtaskrunner package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run printNPMVersion & npm run xcopyLocation
npm ERR! You can get their info via:
npm ERR! npm owner ls npmtaskrunner
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Dev\NPMTaskRunner\NPMTaskRunner\npm-debug.log
Process terminated with code 1.
Is there something else I am missing?
Installed product versions
Description
When using Visual Studio 2017 (tested in Enterprise only), the output does not match that which is produced by Visual Studio 2015 NPM Task Runner and command line usage. I have only tested this with Webpack and Typescript. This causes the build artefacts to be unusable.
Steps to recreate
Load a project you know to be working in VS2015 in VS2017 and try to build the project output.
Current behavior
At present the output is differing in VS2017 and does not seem to have the same environment as VS2015 (default in both situations as I haven't done any customisation, if such is possible). For the purpose of this test if you run
npm start
the build / host result iswebpack: compiled with warnings
. See expected behaviour for the expected outcome.This stops execution of the website as it is causing errors preventing aurelia routing.
Expected behavior
When using the command line (and Visual Studio 2015, though the example project attached doesn't run in VS2015), running
npm start
the build / host result iswebpack: compiled successfully
.This also occurs with the
npm test
command and any command which builds the project, though it's less noticeable in some cases without thorough review of the output.Note for testing
I can't provide an example project for Visual Studio 2015 as the only project I have currently set up for use with 2015 is a company project that is closed source and under non-disclosure. The attached project can also be found on my github page. aurelia-webpack-typescript-skeleton.zip