New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvm install fails with "The filename or extension is too long" #289
Comments
Something is off about this installation... Did you have two versions of NVM installed at the same time by any chance? It may be too late at this point, but what does |
No. I did not have 2 versions of NVM installed at the time when the error occurred.
Actually, not too late. I had a terminal open which still had the older environment.
Additionally, I had installed and was using multiple versions of node through NVM before:
|
I am having the same issue. This is occurring with node
|
I wonder if we should take this up with npm upstream.. |
That would probably work, but just seems like a temporary work around until the next thing wants to go one more directory deep. So yea, raising this as an issue for NPM would probably be a good call. Seeing as 8 isn't at it's final LTS version yet, I'm just reverting to 8.1.4 for now. |
There do appear to be a number of issues with the new versions of npm, specifically those that include npx support. I've added support for npx in the master branch and will release it when 1.1.6 becomes official (currently being tested). However; even in that branch, npx still fails (it also fails through the standalone windows Node installer without NVM4W). I believe this is an npm issue, not an NVM4W issue. I'm closing the issue and marking it as an upstream-issue. |
@coreybutler A small clarification if you don't mind. Why did you have to make changes for npx support? Even with node |
Node 8.1 did not ship with npx support. If you have it in 8.1, you must have run |
Yea.. You are probably right. I do remember upgrading npm. |
I had the same issue, the solution i have is to:
then you should be good |
Thank you @michaelkdh It works for me. 👍 |
@gblue1223 same thing, just need npm in place. cheers, |
@coreybutler According to the issue you linked you can override the paths to install to. |
If you install latest (1.1.6) and instead of For me, using Manually cloning |
@peterbakonyi05 It's still hackish to redefine the nvm folder just to install it too. |
@Sieabah I agree, the whole problem is weird. However I think it is still better than the other 2 proposed solutions (actually none of them worked for me) |
For those still running into this, could someone provide steps for recreating this error? Or perhaps a screencast? I have yet to actually see this in action. Also, I've noticed alot of people are copy/pasting from their terminals... and the syntax like |
@coreybutler Here you go, with cmd.exe C:\Users\Christopher>nvm install 8.4.0 Downloading npm version 5.3.0... Complete C:\Users\Christopher>where nvm C:\Users\Christopher>nvm install 8.4.0 Downloading npm version 5.3.0... Complete C:\Users\Christopher>where node C:\Users\Christopher>where npm |
I'm also on nvm version 1.1.5 if that makes a difference (maybe you're on 1.1.6?) |
I can confirm that the upgrade to 1.1.6 fixes this issue. Makes sense since it looks like some of the filepath management now uses native Go libraries. That would also mean that the filepath bug was within nvm rather than npm itself. Any bug filed over at npm might want to be looked over again. |
Thanks @computerquip-streamlabs. I got this problem and solved by upgrading nvm with,
And then I could install node 8.7.0 with nvm. |
Installing nvm 1.1.6 fix bug with "npm installing: The filename or extension is too long" |
From: C:\Users\[username]\AppData\Roaming\nvm
Then it worked for me! |
Reopening since several users are still running into this. |
FWIW, I'm running Windows 10, I did enable long file paths, but still couldn't install node versions above 6.x... because of the issue with long file path in npm v 5.6, upgrading to nvm 1.1.6 fixed the issue for me. |
My Environment
Windows 8
I'm using NVM4W version:
1.1.5
My issue is related to (check only those which apply):
Expected Behavior
Install node version
8.2.1
Actual Behavior
Fails with error
The filename or extension is too long
Steps to reproduce the problem:
While this is an issue, I doubt there is a direct way to fix it. However, creating this issue to share how I got around it and how maybe it could be avoided.
I installed the latest pre-release version of nvm(
v1.1.6
) but this time installed it toC:\nvm\
to conserve path length. Was able to successfully install nodev8.2.1
after this. Do you think it makes sense to install nvm to this path by default?The text was updated successfully, but these errors were encountered: