Skip to content
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

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

Open
renepanke opened this issue Feb 25, 2024 · 6 comments

Comments

@renepanke
Copy link

renepanke commented Feb 25, 2024

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

Copy link

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.

@github-actions github-actions bot added the Stale Stale label Mar 27, 2024
@renepanke
Copy link
Author

Comment to not let this issue become stale...

@iancward
Copy link

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.

@magynhard
Copy link

Same Problem here:
image

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

image

@iancward
Copy link

iancward commented May 9, 2024

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

@magynhard
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants