6

Using the newest node.js installer from https://nodejs.org, I run into the same error every time when it reaches the npm installation. npm 3.x was supposed to deal with this issue, but apparently it doesn't help the node.js installer. The node developers have essentially refused to do anything about it, as this problem has been around for about two years already. Unfortunately, I can't seem to find a work around. How can I get this to install?

Fibericon
  • 5,684
  • 12
  • 37
  • 64
  • Have a look [https://github.com/lukesampson/scoop/issues/737](https://github.com/lukesampson/scoop/issues/737) – psycho Feb 21 '17 at 10:57
  • And this one too [http://stackoverflow.com/questions/26155135/node-npm-windows-file-paths-are-too-long-to-install-packages](http://stackoverflow.com/questions/26155135/node-npm-windows-file-paths-are-too-long-to-install-packages) – psycho Feb 21 '17 at 10:58

3 Answers3

4

I also had this error, trying to install node-v8.10.0-x64.msi on Windows 10.

My solution (to getting it to install; no idea if it won't break further down the line) was changing the install directory from C:/Program Files/nodejs to C:/njs/ (2nd step of current setup process).

I'm surprised those characters made the difference, and that there even is a Windows node release if there's not a proper solution to this (can't believe that maximum path length on Windows isn't modifiable), but this has seemingly worked for me.

Oli Beatson
  • 811
  • 10
  • 22
1

I don't think its an installer error, actually windows is restricting the path size to be 150 char.

try reducing the file path name by copying it into direct c or d drive.

Check the link below Microsoft Forum

smali
  • 4,687
  • 7
  • 38
  • 60
  • If it's impossible to install node, no matter how short of an installation root I specify, I'm going to have to call it an installer error. I've tried copying the installer to C:\, and even changing the installation root to C:\n, but it's still too long of a path. – Fibericon Feb 21 '17 at 10:19
0

I've used Choco
It works together with NVM 4 Win.
After once installing node with choco install nodejs
then I install other versions of node using NVM e.g. nvm install 6.9.0
following by choosing that version with nvm use 6.9.0
and then verify with nvm list
and node -v.
I also need to install the latest version installed by choco using nvm install 10.1.0

RaSor
  • 869
  • 10
  • 11