Node.js 11: 'node' is not recognized as an internal or external command, operable program or batch file.

westy92's Avatar

westy92

18 Nov, 2018 02:16 AM

After updating to Node.js 11, I get the following error:

'node' is not recognized as an internal or external command, operable program or batch file.

How to reproduce:

Update-NodeJsInstallation (Get-NodeJsLatestBuild 11)
node --version

Full .appveyor.yml file: https://github.com/westy92/html-pdf-chrome/blob/e550bde3d62427e6b46...

Logs: https://ci.appveyor.com/project/westy92/html-pdf-chrome/builds/2035...

I tried adding refreshenv, but that did not help.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 19 Nov, 2018 09:20 AM

    Ilya Finkelshteyn's Avatar

    Please use Install-Product node 11 instead of Update-NodeJsInstallation. Sorry for confusion.

  2. 2 Posted by antonas.graciov... on 03 Dec, 2018 05:22 PM

    antonas.graciovas's Avatar

    This does not work when you need a specific version of Node.js.
    Update-NodeJsInstallation 11.3.0 x64 appears to install Node.js but its not recognized. https://ci.appveyor.com/project/agracio/edge-js/build/job/slov6ui1c...

    All other Node.js versions appear to work fine: https://ci.appveyor.com/project/agracio/edge-js.

    Update:
    Appveyor config file can be found here: https://github.com/agracio/edge-js/blob/master/appveyor.yml.
    The reason for using Update-NodeJsInstallation $env:nodejs_version x64 and not Install-Product node $env:nodejs_version x64 is due to the fact that versions 6.15.0, 8.14.0, 10.14.0 and 11.3.0 are not recognized by Install-Product node

  3. 3 Posted by David Halls on 08 Dec, 2018 08:19 AM

    David Halls's Avatar

    I'm seeing this too.
    How do I specify a particular point-version of Node to use (11.4.0)?
    Update-NodeJsInstallation used to work.

  4. 4 Posted by David Halls on 08 Dec, 2018 11:53 PM

    David Halls's Avatar

    Problem seems to be new Node versions don't support NodePerfCtrSupport

    https://github.com/appveyor/ci/blob/master/scripts/nodejs-utils.psm...

    If I remove NodePerfCtrSupport from the msiexec command then install succeeds.

  5. 5 Posted by David Halls on 09 Dec, 2018 07:56 AM

    David Halls's Avatar

    This works until Start-NodeJsInstallation gets fixed:

      - ps: Remove-NodeJsInstallation $(Get-InstalledNodeJsVersion).version $(Get-InstalledNodeJsVersion).bitness
      - ps: cmd /c start /wait msiexec /i $(Get-NodeJsInstallPackage $env:nodejs_version x64) /q
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac