Node: Error when installing node.js [windows 10]

Created on 24 Feb 2017  路  17Comments  路  Source: nodejs/node

lllll
I installed node-v7.6.0-x64 on windows 10 and when installation I got the following error but the installation completed.
Warning 1909. Could Not Create Shortcut Node.js command prompt.lnk. Verify that the destination folder exists and that you can access it.

And I am getting the following error when trying to write in cmd "npm --version"
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.
4.1.2

  • Version: node-v7.6.0-x64
  • Platform: Windows 10
install windows

All 17 comments

I have issues on my work PC (at home I use Linux) similar to yours. Do you, by chance, have a %homedrive% that is not the same letter assignment as your %systemdrive%? Just asking out of curiosity.

c:\> set | findstr %homedrive%
c:\> set | findstr %systemdrive%

@AlyyMagdy Thanks for reporting. Can you create an installation log with msiexec /i <filename>.msi /l*v InstallLog.txt from the Command Prompt?

About the second error, can you confirm that node.exe exists at that location?
What is the output of where node?

@joaocgreis Thanks for replying
I am sorry but i am hesitated don't know which file name i should put in the
And about the second error yes node.exe exists at that location

This might be related to https://github.com/nodejs/node-v0.x-archive/issues/7369 and https://github.com/nodejs/node-v0.x-archive/issues/8141 , though I don't understand the exact relation between the two. (Note: in all current versions the installer does try to create the folder, but only for the user who is installing.)

@AlyyMagdy can you check if C:\Users\USERNAME\AppData\Roaming\npm exists and is writable? You can try to create it if not. Or, uninstall node, delete the folder, install node again and make sure it was created by the installer.

@joaocgreis I checked the two links and none of them related to my case unfortunately ,
and about the folder "npm" yes it exists.
I have discovered the error , C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Node.js node.js command prompt shortcut is not found
I can't find that shortcut anywhere!

llllll

@AlyyMagdy The installation log would be essential to help you further. Here is how to make it, in case you want to try:

  • Uninstall node
  • Open an Administrator Command Prompt. To do this, right-click a Command Prompt shortcut (in the Start menu, Quick launch) and select "Run as Administrator"
  • Navigate to where you have the downloaded node MSI. If it's in your Downloads folder, you should do cd C:\Users\YOURUSERNAME\Downloads (you can use tab to autocomplete along the way)
  • Install the msi with: msiexec /i <filename>.msi /l*v InstallLog.txt (replace <filename>.msi with the correct name, it's node-v7.6.0-x64.msi for 7.6.0)
  • Paste the generated InstallLog.txt here

I'm having the same problem on a Win 7 machine. I have admin but I think there's some wacky uber-admin stuff going on. Here's my log from an attempt at doing a repair after deleting my %appdata%/roaming/npm DIRs (also npm-cache) and creating appdata/NPM per that older thread.

It's a 19k log file. I'll have to provide a dropbox link instead.

https://www.dropbox.com/s/xavk3b9l722uxd2/Installing.txt?dl=0

It's a crappy laptop. 4 year old i5 with a spinner drive.

@joaocgreis Where can i find that generated "InstallLog.txt" ?

Should be in whatever directory you ran the install in. Edit: By which I mean, wherever the msi file was when you executed.

Edit: Ignore this. Apparently it's not that uncommon for directories to show as read only while the files inside still are.

I think my problem is that something has gone berserk and set folders to Read Only all over my system, including Start Menu folders which is where I assume that lnk file is getting set (not super clear from the log file).

Okay I had one, possibly two problems.

Problem 1: The startup folder being referenced was locked down on my system for some reason. It was set to deny write access to all users. I think at the ProgramData level.

Problem 2: This is the embarrassing problem. My ComSpec var had a semi after the cmd exe and a tortoise/subversion path. I'd love to blame it on Tortoise, which I don't love, but I suspect that was user fail resulting from talking to people and setting vars at the same time a while back. Not sure why I didn't notice problems with npm immediately though.

For anybody else having this issue, I recommend running the log with an install (see above) and searching for the StartupFolder var. Check the permissions on whatever that's set to. Ignore read only settings on folders. That was a red herring for me. Check perms in the security tab of properties (right click a folder) and check Advanced to make sure there's no Deny rules being set.

I solved this - node.js installation, and hope it works for you too. The version for mine was 7.10.0. In it you have to add the node path e.g. "..\Program File\nodejsnode.exe" as their is no "..\Program File\nodejs\bin" sub-directory as I looked into it. Now you will do it to both SYS PATH and your superuser path. Either of them should work though but your admin's PATH should be tried first.

Have the installer in a D or E, then run it. Do not just run in the C or from the download folder (or I can say the system disk) then the problem solved.

This is still an active issue on a brand new windows install. using an installer that was downloaded today.

Edit: As a work around: If you ever get a "Warning 1909" error when trying to install something in Windows 10, Editing permissions from the security tab in the properties of C:\ProgramData\Microsoft\Windows\Start Menu\Programs fixed the problem for us - For some odd reason these get reset/currupted during OS updates or even initial install as was the case here.

That stated, the installer should be smart enough to at least provide the path instead just a file name; This is a defect in the installer.

Hey facing same error. I have changed permissions on Start Menu\Programs also but no worth. Please help someone with this.

Im having issues with this in 2020, what is going on???

NPM needs its own installer.

Once again, this issue is a result of bad engineering/a lack of engineering excellence.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

srl295 picture srl295  路  3Comments

mcollina picture mcollina  路  3Comments

Icemic picture Icemic  路  3Comments

filipesilvaa picture filipesilvaa  路  3Comments

jmichae3 picture jmichae3  路  3Comments