Choco: Node installation error - Win10

Created on 24 Mar 2018  路  6Comments  路  Source: chocolatey/choco

What You Are Seeing?

The node instalation error

What is Expected?

How Did You Get This To Happen? (Steps to Reproduce)

choco install nodejs -y --force

Output Log

choco install nodejs -y --force
Chocolatey v0.10.8
Installing the following packages:
nodejs
By installing you accept licenses for the packages.
nodejs v9.9.0 already installed. Forcing reinstall of version '9.9.0'.
Please use upgrade if you meant to upgrade to a new version.
Progress: Downloading nodejs 9.9.0... 100%

nodejs.install v9.9.0 (forced) [Approved]
nodejs.install package files install completed. Performing other installation steps.
Installing 64 bit version
Installing nodejs.install...
ERROR: Running ["C:\WINDOWS\System32\msiexec.exe" /i "C:\ProgramData\chocolatey\lib\nodejs.install\tools\node-v9.9.0-x64.msi" /quiet ] was not successful. Exit code was '1603'. See log for possible error messages.
The install of nodejs.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\nodejs.install\tools\chocolateyInstall.ps1'.
See log for details.

nodejs v9.9.0 (forced) [Approved]
nodejs package files install completed. Performing other installation steps.
The install of nodejs was successful.
Software install location not explicitly set, could be in package or
default install location if installer.

Chocolatey installed 1/2 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • nodejs.install (exited 1603) - Error while running 'C:\ProgramData\chocolatey\lib\nodejs.install\tools\chocolateyInstall.ps1'.
    See log for details.
Package Issue

All 6 comments

Hi @lincolnbrito - 1603 is a generic error for an MSI install that can indicate lots of things, like a need for a pending reboot. I would suggest adding this to your install --install-args="'/l*v c:\nodeinstall.log'" and then looking through the MSI log to find the actual error on your system - try searching for "Return Value 3" and then look just above that for some notes on errors.

Other notes for future reference:

  • Don't use --force, it is an antipattern. If you want to upgrade a package, you use choco upgrade. If it is not installed, you can use choco install, just drop the force part of the argument.
  • For logs here, we expect a full output log you would get when you run with the options -dv, which is also captured in the log file. For reference, it looks something like this: https://gist.github.com/choco-bot/41b96fad672548e306f4f3330ff2a710#file-install-txt
  • Also, as most of our documentation indicates here (including when you create an issue), don't create issues for packages - if you have a package issue, that needs to go back to the original package maintainers so that it can be fixed. However this is not a package issue but something in your environment, so no need to go back to anyone. Just do as suggested above, find the problem and then fix it on your system so it can install properly.

I had this same problem, and I got to fix it.
My problem is that I had installed another Chocolatey version before, and it was causing this problem.
If you have another Chocolatey version before installed, please ununinstall this, and the install the Chocolatey version that you want.

In my case, i was downgrading my nodejs to lts version.
choco uninstall nodejs is not enough to uninstall the nodejs, so I uninstalled it manually and now it works when I use choco install nodejs-lts

@ccharliemagne nodejs is just a meta-package without any code for installing/uninstalling. when uninstalling that package you also need to uninstall the nodejs.install package as well.

@ccharliemagne nodejs is just a meta-package without any code for installing/uninstalling. when uninstalling that package you also need to uninstall the nodejs.install package as well.

Thanks for more info, it was a stupid mistake by me. I am new to chocolatey and assumed that it will do everything for me.

just to note, you can also use choco uninstall nodejs -x to remove any dependencies not referenced by any other package (be careful with this though, as it can potentially remove chocolatey as well in rare cases).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drusellers picture drusellers  路  4Comments

dustojnikhummer picture dustojnikhummer  路  4Comments

daveMueller picture daveMueller  路  4Comments

ExE-Boss picture ExE-Boss  路  3Comments

michaelmhoffman picture michaelmhoffman  路  4Comments