coreybutler/nvm-windows

[Issue]: Invalid settings generation on install when user name contains non-ASCII characters

renepanke opened this issue · 8 comments

What happened?

After a fresh install the generated path for Node Installations in the settings.txt contains an invalid character sign ( ) for non-ASCII characters and therefore the path can't be found.

Node Installations: C:\Users\Ren�\AppData\Roaming\nvm

What did you expect to happen?

The settings.txt is generated with a valid path. If that is not feasable an entry in the common issues and resolutions should be added that you need to manually update the path in the settings.txt.

In the Relevant log/console output window you can see the nvm debug output before and after adjusting the path in the settings.txt.

Version

1.1.11 or newer (Default)

Which version of Windows?

Windows 10 (Default)

Which locale?

Western European

Which shell are you running NVM4W in?

PowerShell

User Permissions?

Administrative Privileges, Elevated

Is Developer Mode enabled?

No (Default)

Relevant log/console output

PS C:\Users\René> nvm install latest
C:\Users\Ren�\AppData\Roaming\nvm could not be found or does not exist. Exiting.
21.6.2
Downloading node.js version 21.6.2 (64-bit)...
Could not download node.js v21.6.2 64-bit executable.
PS C:\Users\René> nvm debug
C:\Users\Ren�\AppData\Roaming\nvm could not be found or does not exist. Exiting.
Running NVM for Windows with administrator privileges.

Administrator: Windows PowerShell
Windows Version: 10.0 (Build 19045)

NVM4W Version:      1.1.12
NVM4W Path:         C:\Users\René\AppData\Roaming\nvm\nvm.exe
NVM_HOME:           C:\Users\René\AppData\Roaming\nvm
Node Installations: C:\Users\Ren�\AppData\Roaming\nvm

Total Node.js Versions: 0
Active Node.js Version: v20.3.1

IPv6 is enabled. This can slow downloads significantly.

PROBLEMS DETECTED
-----------------
NVM_SYMLINK (C:\Program Files\nodejs) is not a valid symlink.


Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues
PS C:\Users\René> nvm debug
Running NVM for Windows with administrator privileges.

Administrator: Windows PowerShell
Windows Version: 10.0 (Build 19045)

NVM4W Version:      1.1.12
NVM4W Path:         C:\Users\René\AppData\Roaming\nvm\nvm.exe
NVM4W Settings:     C:\Users\René\AppData\Roaming\nvm\settings.txt
NVM_HOME:           C:\Users\René\AppData\Roaming\nvm
NVM_SYMLINK:        C:\Program Files\nodejs
Node Installations: C:\Users\René\AppData\Roaming\nvm

Total Node.js Versions: 0
Active Node.js Version: v20.3.1

IPv6 is enabled. This can slow downloads significantly.

PROBLEMS DETECTED
-----------------
NVM_SYMLINK (C:\Program Files\nodejs) is not a valid symlink.


Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues
PS C:\Users\René> nvm install latest
21.6.2
Downloading node.js version 21.6.2 (64-bit)...
Extracting node and npm...
Complete
npm v10.2.4 installed successfully.


Installation complete. If you want to use this version, type

nvm use 21.6.2

Debug Output

PS C:\Users\René> nvm debug
C:\Users\Ren�\AppData\Roaming\nvm could not be found or does not exist. Exiting.
Running NVM for Windows with administrator privileges.

Administrator: Windows PowerShell
Windows Version: 10.0 (Build 19045)

NVM4W Version:      1.1.12
NVM4W Path:         C:\Users\René\AppData\Roaming\nvm\nvm.exe
NVM_HOME:           C:\Users\René\AppData\Roaming\nvm
Node Installations: C:\Users\Ren�\AppData\Roaming\nvm

Total Node.js Versions: 0
Active Node.js Version: v20.3.1

IPv6 is enabled. This can slow downloads significantly.

PROBLEMS DETECTED
-----------------
NVM_SYMLINK (C:\Program Files\nodejs) is not a valid symlink.


Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues

Anything else?

No response

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Comment to not let this issue become stale...

We did the noinstall method for NVM and wrote out the settings.txt file with PowerShell, which caused the file to be generated in the (PowerShell default) UTF-16LE encoding, which caused an issue just like this.

Converting the settings.txt to ascii fixed it. It didn't work even with regular UTF-8.

Same Problem here:
image

Opening settings.txt and converting it to UTF-8 using Notepad++ solved it.

image

That's interesting you got it to work using UTF-8; for me, I could only get it to work if the file was ASCII
#1124

I was running on Windows 11 with German locale on the latest nvm 1.1.12 on node 18.12.1

Using the classic command line (cmd).

Notepad++ recognized the settings.txt as ASCII format, so i chose "convert to UTF-8" and it worked.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

This issue was closed because it has been stalled for 7 days with no activity.