-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Windows Installer didn't add Node PATH #4356
Comments
It should add them both. What was the /cc @piscisaureus @sblom |
I had just "C:\Users\brosenbach\AppData\Roaming\npm" as my PATH. I had to add ";C:\Program Files\nodejs" myself. Not sure why that was. |
Same here. Just installed using MSI installer, 64bit version. Path was incorrectly set. Even now, when I fixed it manually by adding "C:\Program Files\nodejs" (to user environment and system environment) and removing the Appdata one that points to an empty folder, I can only run it from any command-line if cmd.exe is run as Administrator. As a user, I can only run it from inside that folder. |
Same issue here! :) |
This just happened to me with the installer: v0.10.17 (added roaming path and not path to application, in my case R:\Applications\nodejs) |
Just had the same problem as @benirose on a fresh Windows 8.1 Pro installation. |
I'm also facing the same problem. When I wrote echo $PATH in node.js terminal, It didn't show anything. I need to set the PATH to "C:\Program Files\nodejs". So, what should I do now? |
I just had the same problem on a Surface Pro running Windows 8.1 Pro (64 bit). |
I had the same issue, but I noticed if I opened up my environment variables, node was in my path already. Closing environment variables, re-opening my command windows and node is now on my path and available. |
Yep, windows is like that, having to close out of the windows cmd line and
|
You may misunderstand me. It wasn't the opening and closing of windows cmd line that fixed the issue for me. It was opening Environment Variables and closing it that made it work. It's almost as if Environment Variables did not recognize the change. |
System wide variable changes are usually not fully recognized on windows
|
Yes, needing a reboot is something required, but other times simply opening a new Command Prompt windows is sufficient. Perhaps the installer should simply recommend a reboot after install to clear up the confusion when users try to instantly start using node.js from the command line? |
Actually, I take that back. The installer should be able to get the new PATH picked up by broadcasting a It seems from these reports that this isn't being done, so if the installer did this, it should fix the issue. |
For those so inclined to make a PR to this, it looks like someone has posted instructions for how to accomplish this in WiX: http://www.kajabity.com/2013/09/an-update-to-the-apache-maven-installers-broadcasting-wm_settingchange-to-update-environment-variables/ |
The fix isn't yet in the installer, at least from my experience using it today on Win8.1 Pro 64-bit. Opening and closing "Environment Variables" only worked if I closed with the OK button; trying Cancel didn't. FYI. |
I did not install Node into |
👍 |
Same thing happened to me today. The fix mentioned by @rbellio made the path updates be recognized without a reboot. |
Same here but a restart fixed the issue. Path was recognized after that. |
Restart fixed the issue, Windows 8.1. |
I ran the command prompt as administrator and it worked. |
It's been awhile since I've done this. Are there explicit instructions
|
I'm having the reverse issue where global modules do not work for me, not sure why |
This has been fixed by io.js in nodejs/node#603. I suggest that we integrate this fix in v0.12. Removing the maybe-close label. |
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <bertbelder@gmail.com> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: #25100 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> Fixes: #4356
This is needed so that we can backport 668bde8 from io.js with a clean merge. PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> Fixes: nodejs#4356
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <bertbelder@gmail.com> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> Fixes: nodejs#4356
This is needed so that we can backport 668bde8 from io.js with a clean merge. PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> Fixes: nodejs#4356
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <bertbelder@gmail.com> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> Fixes: nodejs#4356
Fixed with f50c37d and shipped in v0.12.5. |
This issue was moved to milestone 0.12.6 by mistake because it hadn't been closed after the fix landed and shipped with node v0.12.5. Moving it back to the 0.12.5 milestone to avoid confusion. |
@uniring it works from console, thank you |
This is needed so that we can backport 668bde8 from io.js with a clean merge. PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> Fixes: nodejs#4356
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <bertbelder@gmail.com> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <julien.gilli@joyent.com> Fixes: nodejs#4356
I just installed Node using the .msi for Windows 7 64-bit. It seemed to add npm to my PATH but not node. I was able to add it easily, but didn't see this detail in the instructions. A new developer may not know this is something they have to do if the install fails to do it. Adding a note to the installation instructions may be helpful.
The text was updated successfully, but these errors were encountered: