Closed Uxspy closed 8 years ago
As a workaround, I copy the "settings.txt" from c:\users\my-user\name\appdata\roaming\nvm to c:\ and it works.
I had this issue too. Moved settings.txt to C:/ but my install is still broken. Not sure if it's related.
No roaming file here this is a clean install what am I supposed to do?
looks like just creating the file with nothing in it works is this correct?
I'm having the same problem with Windows Server 2012 R2. Completely clean Windows install. Downloaded v1.0.6 and have the same issue. Tried copying settings.txt to c:\ but same problem.
Also, attempting to start nvm from the Start Menu causes a window to flash for a split second and then disappear. This makes me think that there's something wrong with paths..
Copied settings.txt to c:\ and it worked for me.
I finally tried a reboot and it seems it worked. Looks like an environment variable probably needs to be set that doesn't get setup until initial login. I wonder if there's any way to guarantee triggering it right after installation.
This happens after a fresh install of Windows 10 too, with no prior node or iojs installations.
I believe that the main culprit behind this error is NVM_HOME
not being set.
This might be fixed if you close all your command prompts (and I say ALL) and then try again.
Yeah, it worked fine for me after I opened a new command prompt and the environment vars were refreshed. I'm not sure if the cmd prompt that pops up at the end of setup opens a little bit too soon? Or does it carry the [lack of] environment vars from the parent process (the installer)? Just a bit annoying that it doesn't appear to install cleanly.
Had the same problem. Added nvm and nodejs (C:\Users\Me\WebDev\nvm - I altered default install directory for nvm - C:\Program Files\nodejs) directories to the PATH, restarted CMD, and it's working now. NVM_HOME and NVM_SYMLINK were set with install, but for whatever reason, it wasn't working. Using Windows 10.
nvmw: V1.0.6, windows 10(64bit) no-install; What is workaround if setting.txt no come in pack?
Here's the contents of my c:\settings.txt
file (replace <user>
with your user name)
root: C:\Users\<user>\AppData\Roaming\nvm
path: C:\Program Files\nodejs
Had this issue with v1.1.0 when I opened cmd.exe from the installer. It worked fine after closing the prompt and opening another.
Had this with 1.1.0 too, copying %appdata%\nvm\settings.txt
to C:\
worked.
I also had this issue with v1.1.0 when I opened cmd.exe from the installer. It worked fine after closing the prompt and opening another.
I have this problem on the cmd prompt opened by the installer - this installer: https://github.com/coreybutler/nvm-windows/releases/download/1.1.0/nvm-setup.zip
If I open up a new command prompt, it works fine. Same as eeeeeverybody else.
Seeing the same problem when using the "noinstall" version. If there's a particular environment variable which needs to be set before it'll work, that's fine, but the error message should say what needs setting.
E: Actually, we can go one better. After reading the manual installation instructions it seems that there are much simpler solutions. settings.txt
should exist as part of the "noinstall" ZIP; and if the root
and path
settings are omitted they should default to NVM_HOME
and NVM_SYMLINK
. Likewise, if NVM_HOME
and NVM_SYMLINK
are missing, they should default to the location of nvm.exe
and a subdirectory of that directory respectively.
The prompt to open a terminal window after installation has been removed. It may come back in a future version with a different installer. Bottom line: the installer launches the window prematurely on too many systems, in an unreliable patter.... so it's gone in 1.1.1.
Don't forget to do what are explained in the wiki https://github.com/coreybutler/nvm-windows/wiki
A suggestion for the nvm installer is maybe give a message to the user at beginning of install that the command window will close once install is complete. Then, just close the command window when the install finishes. Then the user is forced to open a new command window after installation.
If you come across this error and use Windows Terminal, try closing Windows Terminal completely and reopening it -- don't just open a new tab.
Here I installed in a different drive, and it only worked in a:\settings.txt
. But this is annoying, I wish I could control where this file is (I have a special folder with configs from all apps) or at least in the nvm folder
I followed what vkbansal did by setting NVM_HOME to where my nvm is and it worked
I ran into this issue as well.
I installed nvm using scoop on the latest powershell version, 7.1.4
My NVM_HOME and NVM_SYMLINK environment variables were not set. I had to manually set them. After I manually set the environment variables it worked without creating a settings.txt file, and without any other issues.
I ran into this problem doing the manual install. Wasted a ton of time trying most of these suggestions. Eventually, I just uninstalled and did the nvm-setup.zip and it ran without issue... another evening learning computer programming, thinking I'll get something done, but just installed NVM and node... Thanks to those of you that can stick with it and make good things.
I tried most of the solutions that worked for other people here but still was facing the same issue so I just created a new file and save it as settings.txt inside the folder I extracted the nvm zip.... and manually add this folder to path because the installer.cmd did not work for me even after restart (on windows 10). Opened the new PowerShell (even cmd can work). You can download the settings.txt file on following link settings.txt and modify it according to your pc specs.
for those who install via scoop, dir is: C:\Users\<username>\scoop\persist\nvm
Just had this issue on a brand new install of Windows 11 on a brand new laptop using the latest bits of everything.
If you encounter this issue, close all terminals, all instances of Windows Terminal, All instances of console, then get coffee/tea/water, then reopen Windows Terminal as Admin and type 'nvm root' and it should work... it did for me.
settings.txt needs to be copied to the root of drive where nvm is installed, in my case it was G:\Program\nvm, so coping settings.txt to C: didn't work, until I copied to G:\:settings.txt
I just downloaded and used the nvm-setup.exe for version 1.1.9 and had the same issues. While it collected the install and symlink directories, it would seem the installer is not adding the necessary environment variables, %NVM_HOME% and %NVM_SYMLINK%. after following the manual install directions and adding those variables, everything worked perfectly.
There was no need to move the settings.txt file from the root install directory.
As with everything in Windows: RESTART YOUR MACHINE.
Como con todo en Windows: REINICIA TU MÁQUINA.
REINICIANDO LA MAQUINA SE ARREGLA.
So "noinstall" doesn't mean that you don't have to install, it means that it won't install for you and you have to install it yourself. Just use the setup version.
Just expanding on the comment by vkbansal, which 8 years later still remains helpful:
NVM_HOME
;%appdata%\nvm
(or whatever path NVM is in);nvm current
- no need to reboot. It should display the current version.I have 2 pertinent things to say about this.
1) if you did the manual install from the installation guide you will get this error. Delete the npm folder from your manual install and just run nvm-setup.zip
2) if you are using a company computer you may have to make AppData not hidden
I ran CMD (not PWS) as administrator and ran mklink "C:\settings.txt" "%APPDATA%\nvm\settings.txt"
for the "workaround"
Restarting my PC worked for me
For me I named the file as settings.txt; show the extension then the actual name is settings.txt.txt. Remove the extra extension.
SOLUTION FOR AUTOMATED INSTALLATION
I am installing nvm and all other stuff using winget *.bat script / command line
In the script I am setting temp local variable NVM_HOME
This works and solves \settings.txt error
winget install --wait --disable-interactivity --location "c:\nvm" -e --id CoreyButler.NVMforWindows
SET NVM_HOME=c:\nvm\
nvm install latest
nvmw: V1.0.6, windows 8(64bit), normal install, no errors during install, after install, click finish with "run cmd" by default.