madskristensen / NpmTaskRunner

Visual Studio extension
Other
88 stars 32 forks source link

Executes wrong version of nodejs #66

Closed BrianMinister closed 6 years ago

BrianMinister commented 6 years ago

Installed product versions

Description

I have NodeJs 8.11.3 installed but task runner keeps running 5.4.1, Where and how do I change this? My build is breaking.

Steps to recreate

  1. Add Angular 6 & Angular CLI 6 to the project
  2. Generate the initial Angular project. Make sure that Angular.json is in the VS project directory, as the rest of the angular code lays out correctly for the angular.json specifications.
  3. add to package.json, in the scripts settings, add: "build": "ng build --verbose --extract-licenses --build-optimizer --progress --aot",
  4. From Task Runner, execute build.

Current behavior

When I run the same build command from package manager, it works perfectly. I run it from Task Runner, I get:

You are running version v5.4.1 of Node.js, which is not supported by Angular CLI v6.
...
    npm ERR! node v5.4.1
    npm ERR! npm  v3.3.4

Expected behavior

Should result in the same success as the package manager window.

scottaddie commented 6 years ago

Try the following in VS 2017:

BrianMinister commented 6 years ago

That got it! Thx.