nvm-windows icon indicating copy to clipboard operation
nvm-windows copied to clipboard

Installation completes ... then executable does nothing

Open geekkid1 opened this issue 8 years ago • 6 comments

If this is a question about how to use NVM4W, please use stackoverflow instead.

If this is an issue regarding antivirus, make sure you search the existing issues first.

My Environment

  • [ ] Windows 7 or below (not truly supported due to EOL - see wiki for details)

  • [ ] Windows 8

  • [ ] Windows 8.1

  • [x] Windows 10

  • [ ] Windows 10 IoT Core

  • [ ] Windows Server 2012

  • [ ] Windows Server 2012 R2

  • [ ] Windows Server 2016

  • [ ] My Windows installation is non-English.

I'm using NVM4W version:

  • [x] 1.1.6
  • [ ] 1.1.5
  • [ ] 1.1.4
  • [ ] 1.1.3
  • [ ] 1.1.2
  • [ ] 1.1.1
  • [ ] Older
  • [ ] OTHER (Please Specify)

I have already...

  • [x] read the README to be aware of npm gotchas & antivirus issues.
  • [x] reviewed the wiki to make sure my issue hasn't already been resolved.
  • [x] verified I'm using an account with administrative privileges.
  • [ ] searched the issues (open and closed) to make sure this isn't a duplicate.
  • [x] made sure this isn't a question about how to use NVM for Windows, since gitter is used for questions and comments.

My issue is related to (check only those which apply):

  • [x] settings.txt (maybe?)
  • [ ] proxy support (Have you tried version 1.1.0+?)
  • [ ] 32 or 64 bit support (Have you tried version 1.1.3+?)
  • [ ] Character escaping (Have you tried version 1.1.6+?)
  • [ ] A standard shell environment (terminal/powershell)
  • [ ] A non-standard shell environment (Cmder, Hyper, Cygwin, git)
  • [x] Installation

Expected Behavior

Run the installer, use it correctly, run the program, it works.

Actual Behavior

The above, except it doesn't work. The installer.cmd does absolute jack when I try to run it. I run the .exe file and it just flashes a cmd window.

Steps to reproduce the problem:

I don't know if this is reproduceable or just something I have wrong with my computer

geekkid1 avatar Sep 12 '17 18:09 geekkid1

On some systems, the installer doesn't quite finish before it tries to launch the terminal. I was never able to force it to run synchronously, so on occasion this occurs. It's rare, but has happened a handful of times. The fix is simple though.... close the terminal and open it again.

coreybutler avatar Sep 12 '17 18:09 coreybutler

FYI, there seems to be an error in the program which prevents it from doing anything when launched.

When launched, it looks for the "\settings.txt" , can't find it, and crashes.

The file is in the same directory as the executable, NOT in the root directory.

I circumvented this problem by copying the file to the root directory for now.

The only problem now is that the program does nothing useful (version 1.1.6). I ask it to install node 5.12 and it replies that it installed it after a short delay. Then it's impossible to switch to it. And node is not even available anymore at all. Can't ask for the version number, can't run npm.

Installed 1.1.5. Asked for 5.12 to be installed: pgm replied that it's there already. Asked to switch to 5.12: replied done. Checked node version: 5.12. All ok.

mmikeyy avatar Sep 14 '17 22:09 mmikeyy

I tried running it from command line again and it worked. Thanks for the help On Thu, Sep 14, 2017 at 6:59 PM Mmikeyy [email protected] wrote:

FYI, there seems to be an error in the program which prevents it from doing anything when launched.

When launched, it looks for the "\settings.txt" , can't find it, and crashes.

The file is in the same directory as the executable, NOT in the root directory.

I circumvented this problem by copying the file to the root directory for now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/coreybutler/nvm-windows/issues/301#issuecomment-329631507, or mute the thread https://github.com/notifications/unsubscribe-auth/AWTsl1-y8QuThs7VX52VydO0pKF95kAWks5sia_BgaJpZM4PVES_ .

geekkid1 avatar Sep 15 '17 14:09 geekkid1

I just installed nvm through chocolatey and have the same issue:

ERROR open \settings.txt: The system cannot find the file specified.

(after adding C:\ProgramData\nvm to %PATH%)

madebr avatar May 21 '22 09:05 madebr

nvm install 14

ERROR open C:\Users\cjamc\AppData\Roaming\nvm\settings.txt: The system cannot find the path specified.

I installed via nvm-setup.exe 1.1.9 to C:\nvm (because the default location in AppData results in exit status 1 error when trying to use a node).

Edition	Windows 10 Home
Version	21H2
Installed on	‎1/‎4/‎2021
OS build	19044.1766
Experience	Windows Feature Experience Pack 120.2212.4180.0

connorjclark avatar Jul 08 '22 18:07 connorjclark

I just installed nvm through chocolatey and have the same issue:

ERROR open \settings.txt: The system cannot find the file specified.

(after adding C:\ProgramData\nvm to %PATH%)

This issue still exists in 2022 with Windows 11. For example, if you install via choco (silent CLI script), it installs fine -- but does not work until you restart Powershell; not even with the standard scripts to refresh the env vars, eg:

$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")

nvm is completely unusable until you restart PS - there's something undocumented that needs to happen in addition to refreshing the env vars. Expected: Running the script above should refresh the env vars and allow nvm to be fully usable.

EDIT: Found a temporary workaround:

$env:NVM_HOME="C:\ProgramData\nvm"
$env:NVM_SYMLINK="C:\Program Files\nodejs"

dylanh724 avatar Sep 26 '22 13:09 dylanh724