coreybutler / nvm-windows

A node.js version management utility for Windows. Ironically written in Go.
MIT License
37.28k stars 3.32k forks source link

[Issue]: The System cannot find the file specified #1146

Closed rfbruce closed 3 months ago

rfbruce commented 3 months ago

What happened?

nvm list available ERROR open C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\nvm\settings.txt: The system cannot find the file specified.

What did you expect to happen?

Listing of available versions of node version for node js.

Version

1.1.11 or newer (Default)

Which version of Windows?

Windows 10 (Default)

Which locale?

English (Default)

Which shell are you running NVM4W in?

Command Prompt

User Permissions?

Administrative Privileges, Elevated

Is Developer Mode enabled?

No (Default)

Relevant log/console output

C:\Users\xyz>nvm -v
1.1.12

C:\Users\xyz>nvm list available

ERROR open C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\nvm\settings.txt: The system cannot find the file specified.

Debug Output

C:\Users\xyz>nvm debug

ERROR open C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\nvm\settings.txt: The system cannot find the file specified.

Anything else?

User install works perfectly fine. I'm trying to install NVM via system center configuration manager to one automate install for multiple users and setup a personal repository for developers to get updates from without needing to reach out to the internet to get different node js versions.

As stated it all works fine from user install. SCCM installs as System on the end computers. Install works, restart gets the NVM_HOME and NVM_SYMLINK setup. nvm -v returns the version running, but no other commands work. Stating it is unable to find the settings.txt file even though it is there.

In addition (maybe consider this for runtime as I know feature requests are frozen), the /LOG="path/file" for the possible commands causes installs to fail if the folder specified doesn't exist. Granted this is pretty easy to solve in scripting the install, but would be cool if it made any missing folders in the path rather than just failing the install.

image image image

rfbruce commented 3 months ago

Well turned out to be a permission issue. Surprise surprise. Changing the default location for the install by tacking on a /DIR="path" resolved my issue.