-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Clean install of nvm 1.1.5, node 8.10.0 - npm not working #364
Comments
I have the exact same issue. |
Check that your user name does not have space, in some cases "C:\Users\Name LastName\AppData\Roaming\nvm", when I changed the nvm installation folder to another location "C:\node\nvm" , the installation of node + npm worked fine. |
There are no spaces (or other odd characters) in |
I have the exact same issue also with nvm 1.1.6 and installing node 10.6.0 (or any other node version). If I navigate to Directory of C:\Users\flawi\AppData\Roaming\nvm\v10.6.0\node_modules
09.07.2018 18:22 <DIR> .
09.07.2018 18:22 <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 220.739.076.096 bytes free If I observe the installation process after For completeness here is my
By the way, I have same issue also with nvm versions 1.1.5 and 1.1.4 (also if I use paths without spaces). MitigationIf you copy |
I saw this to trying to install node 10.6.0 with 1.1.5. I even ran in an admin command prompt from the get-go. If I downloaded the 10.6.0 package from the nodejs.org website and compared it to what was in the nvm/v10.6.0 directory, what nvm installed was missing over half the npm packages. After copying, everything worked fine, but nvm gave no indication that the install hadn't completed successfully. |
#353 related? |
I have the same issue. Installed 10.7.0, npm does not work. No spaces in nvm root |
To clarify, I had a node_modules folder and an npm folder in it, but it was missing files and was given no errors in any of my attempts to install or reinstall. Once I deleted that npm folder, downloaded npm-v6.1.0.zip manually and extracted my npm works fine. |
Similar problem (with fresh install of nvm 1.1.5 - after uninstalling node and removing any npm directories in user\AppData...). When I type npm I get the following. internal/modules/cjs/loader.js:583 Error: Cannot find module 'npmlog' Error: Cannot find module 'npmlog' |
So, I was having a similar problem to this and resolved it. I'll relay the steps I took to resolve it, and hopefully it helps someone. First, I installed nvm, then node 8.11.4. Installed nvm again, then After that, everything seems to work. |
I'm having the same problem with nvm 1.1.7.
Am I missing some PATH parameters? I have |
Further to this, it seems that even though gulp is installed into the main npm folder in Roaming, it is not being used. If I type the gulp command it can't find it, if I move the gulp files to the relevant nvm folder it works. So it looks in the right place for its commands, just doesn't install it to the right place. |
Ok I think I have found the problem. Looks like internally npm is still really holding on to the AppData\Roaming folder for its settings, one of which is the Source for fix (unrelated to nvm): https://stackoverflow.com/a/38270345/1535244 EDIT: The setting for |
I'm not sure if this will help anyone, but I'll leave it here just in case. I also had this issue and I found what @dfibuch and @Flawi said was pretty useful for finding understanding the issue that I was having. So here's all my info:
In my case, I was trying to install the latest Before deleting the
So deleting the After that, I decided to try @Flawi's process. I did find the Maybe the issue is not completely I got back to using v I would also like to add that I had a similar problem like @dfibuch. I installed |
Upgrade to v1.1.7, which resolves #373 (issues with npm for Node 10.x.x+). The issue with spaces in the path has been resolved in master (via PR #355) and is scheduled for release in 1.1.8. If you need the functionality right now, you can build from source. I'll get 1.1.8 out as soon as I can, but there are a few other fixes still being merged in. Closing since the aforementioned issues/resolutions should resolve this one. |
I had de same issue (empty node_modules dir) and disabling antivirus solved the problem (using nvm 1.1.7) |
Same as @sergioedo (disabling the antivirus when installing via nvm). Thanks for the help! |
Still having the same problem. |
Going to two years now @coreybutler, nothing? |
Of course I still don't think 1.1.8 will fix this (unless there have been other changes not mentioned here). There's something about the way it tries to install npm that anti-virus really doesn't like, and a blanket "disable AV" is not something that everyone wants to do or even can do. For McAfee Endpoint Security, it is "On-Access Scan" that blocks it. However, there's never anything in its logs when it does (or they're only accessible to my network admins). |
@tedyyu @filipemerker Github actions completely changed when I was working on it... different formats, libraries, etc. Kind of had to restart, then Go switched to modules. By that time, I was busy with other things (see this and this). Thus no new releases. It hasn't fallen of my radar... in fact, we're working on a whole new CLI dev environment, since NVM4W is just one of many. A very early draft mockup: RE: Antivirus & npm The major antivirus companies have all had NVM4W submitted and approved... not sure why they'd still be complaining, but it could be npm related. Node 8.x.x used a version of npm with some hard coded install dependencies (which has been a thorn in the process for several years now, despite Node 8's deprecation), which create some funky behaviors. |
@coreybutler as I said, it doesn't complain it just silently blocks the extract/move/copy. Nor is it because of an old npm (this still happens with the latest and LTS versions). This comment is the one with the details: #364 (comment) |
I've just gone and had a look at the source code.
If that's true, it may be that the AV is massively slowing it down by scanning every single extracted file (of which there are ~4400). You don't seem to do anything when your retry loop gives up, which would explain why the failure is completely silent. I reckon you either need to change how you wait for them to be "ready", or you need to extract them directly to the right place. |
If you are behind enterprise firewall with proxy requiring authentication, you might have to use this fix here to copy npm folder manually: https://geektalk.tech/2019/05/29/nvm-is-a-life-saver-when-you-want-to-work-with-multiple-version-of-node-js/, as @NShulzhenko mentioned here already: https://gitter.im/coreybutler/nvm-windows?at=5e137763e409da486cd5aba1 After that, it is recommended to configure a proxy in npm, as described here If you have to authenticate at the proxy, this might still not be sufficient, then you might have to install a local proxy that also supports providing auth tokens like px and set your proxy in npm to a local port, e.g. http://172.0.0.1:3128 |
Hit the same issue today. Tried few times - ran the cmder as administrator as well, use the directory without space for NVM, but no help.
|
@rkschamer thanks, you brought me on the right track. |
To reiterate, the workaround is to disable AV scanning when installing. An actual fix requires a better solution to the Windows unzip delay. |
Hi For anyone that would be have this problem. I can say that, in my case i discover that problem is happening when i'm running the installer from a different partition to windows was installed. So when i reinstall using nvm-setup.exe from C: partition, all is installed an npm is finded without problems!!, no need to modify enviroment variables in my win10. I know that this looks crazy, but i think that this can be usefull to developers resolve this issue, or anyone need help for this now. bye. |
The directory C:\Users\me\AppData\Roaming\nvm\v8.10.0\node_modules exists, but is empty.
The text was updated successfully, but these errors were encountered: