You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created a user account containing a space in the username. (Username: John Doe)
Install nvm from Git bash
Opened a new shell (to reload .bashrc)
Tried to install node v20.16.0 using the command nvm install 20.16.0 (This node version exists and this command works on nvm v0.39.7)
On Linux,
Set the environment variable $XDG_CONFIG_HOME to /home/user/test dir which is an existing empty directory in the user's home with a space in its path. The current user has read, write, and execute permissions for this test dir directory.
Install nvm using the command mentioned above (using curl)
Opened a new shell (to reload .bashrc)
Tried to install node v20.16.0 using the command nvm install 20.16.0
What happened?
On both operating systems, nvm installation (using curl) succeeded.
However, on both systems, nvm install 20.16.0 command failed with the following error. (The same command works properly with nvm version 0.39.7. Please see the Additional Details section at the bottom)
On Windows,
Downloading and installing node v20.16.0...
Downloading https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-x64.zip...
Warning: Failed to create the file C:/Users/John: Permission denied
curl: (23) Failure writing output to destination
curl: (6) Could not resolve host: Doe
Binary download from https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-x64.zip failed, trying source.
grep: /c/Users/John Doe/.nvm/.cache/bin/node-v20.16.0-win-x64/node-v20.16.0-win-x64.zip: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Can not determine how many core(s) are available, running in single-threaded mode.
Please report an issue on GitHub to help us make nvm run faster on your computer!
Installing from source on non-WSL Windows is not supported
On Linux,
Downloading and installing node v20.16.0...
Downloading https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-x64.tar.xz...
##################################################################### 100.0%curl: (22) The requested URL returned error: 416
##################################################################### 100.0%curl: (6) Could not resolve host: dir
Binary download from https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-x64.tar.xz failed, trying source.
grep: /home/user/test dir/nvm/.cache/bin/node-v20.16.0-linux-x64/node-v20.16.0-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Downloading https://nodejs.org/dist/v20.16.0/node-v20.16.0.tar.xz...
##################################################################### 100.0%curl: (22) The requested URL returned error: 416
##################################################################### 100.0%curl: (6) Could not resolve host: dir
Binary download from https://nodejs.org/dist/v20.16.0/node-v20.16.0.tar.xz failed, trying source.
grep: /home/user/test dir/nvm/.cache/src/node-v20.16.0/node-v20.16.0.tar.xz: No such file or directory
Provided file to checksum does not exist.
What did you expect to happen?
To install node without an error.
Is there anything in any of your profile files that modifies the PATH?
no
Additional Details
This error does not occur when $NVM_DIR does not contain spaces on both operating systems, under the same conditions except that $NVM_DIR is set to a directory whose path does not contain spaces (ex: on Windows with username JohnDoe, and on Linux with $XDG_CONFIG_HOME set to /home/user/test_dir) (in nvm versions 0.40.0 and 0.39.7)
This error does not occur with nvm version 0.39.7 on both operating systems, even with spaces in $NVM_DIR path, using the same commands, environment variables, node version, user account, and directories.
The text was updated successfully, but these errors were encountered:
Operating system and version:
Should affect all supported operating systems. Tested on,
nvm debug
output:nvm ls
output:How did you install
nvm
?curl -o - https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
What steps did you perform?
On Windows,
John Doe
)nvm install 20.16.0
(This node version exists and this command works on nvm v0.39.7)On Linux,
$XDG_CONFIG_HOME
to/home/user/test dir
which is an existing empty directory in the user's home with a space in its path. The current user has read, write, and execute permissions for thistest dir
directory.nvm install 20.16.0
What happened?
On both operating systems, nvm installation (using curl) succeeded.
However, on both systems,
nvm install 20.16.0
command failed with the following error. (The same command works properly with nvm version0.39.7
. Please see the Additional Details section at the bottom)On Windows,
On Linux,
What did you expect to happen?
To install node without an error.
Is there anything in any of your profile files that modifies the
PATH
?no
Additional Details
$NVM_DIR
does not contain spaces on both operating systems, under the same conditions except that$NVM_DIR
is set to a directory whose path does not contain spaces (ex: on Windows with usernameJohnDoe
, and on Linux with$XDG_CONFIG_HOME
set to/home/user/test_dir
) (in nvm versions 0.40.0 and 0.39.7)0.39.7
on both operating systems, even with spaces in$NVM_DIR
path, using the same commands, environment variables, node version, user account, and directories.The text was updated successfully, but these errors were encountered: