i am trying to install nvm by cmd
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
under git bash in windows, but it failed. the version of git
Pazu@Pazu-PC MINGW64 /e/hexo
$ git --version
git version 2.8.1.windows.1
here is the error logs
Pazu@Pazu-PC MINGW64 /e/hexo
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10250 100 10250 0 0 9386 0 0:00:01 0:00:01 --:--:-- 10108
=> Downloading nvm from git to '/c/Users/Pazu/.nvm'
=> Cloning into 'C:/Users/Pazu/.nvm'...
remote: Counting objects: 5534, done.
remote: Compressing objects: 100% (9/9), done.
remote: TReceiving objects: 100% (5534/5534), 1.61 MiB | 575.00 KiB/s, done.
otal 5534 (delta 3), reused 0 (delta 0), pack-reused 5525
Resolving deltas: 100% (3353/3353), done.
Checking connectivity... done.
error: unable to create file test/fast/Aliases/"nvm alias" should not accept aliases with slashes (Invalid argument)
error: unable to create file test/fast/Aliases/"nvm unalias" should not accept aliases with slashes (Invalid argument)
error: unable to create file test/fast/Aliases/Running "nvm alias <aliasname> <target>" again should change the target (Invalid argument)
error: unable to create file test/fast/Aliases/Running "nvm alias <aliasname>" should list but one alias. (Invalid argument)
error: unable to create file test/fast/Aliases/Running "nvm alias" lists implicit aliases when they do not exist (Invalid argument)
error: unable to create file test/fast/Aliases/Running "nvm alias" lists manual aliases instead of implicit aliases when present (Invalid argument)
error: unable to create file test/fast/Aliases/Running "nvm alias" should list all aliases. (Invalid argument)
error: unable to create file test/fast/Aliases/lts/"nvm alias" should ensure LTS alias dir exists (Invalid argument)
error: unable to create file test/fast/Listing paths/Running "nvm which 0.0.2" should display only version 0.0.2. (Invalid argument)
error: unable to create file test/fast/Listing paths/Running "nvm which foo" should return a nonzero exit code when not found (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls 0.0.2" should display only version 0.0.2. (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls 0.2" should display only 0.2.x versions. (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls foo" should return a nonzero exit code when not found (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls io" should return NA (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls node_" should return a nonzero exit code when not found (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls stable" and "nvm ls unstable" should return the appropriate implicit alias (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls system" should include "system" when appropriate (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls" should display all installed versions. (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls" should filter out ".nvm" (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls" should filter out "versions" (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls" should include "system" when appropriate (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls" should list versions in the "versions" directory (Invalid argument)
error: unable to create file test/fast/Listing versions/Running "nvm ls" with node-like versioning vx.x.x should only list a matched version (Invalid argument)
error: unable to create file test/fast/Running "nvm alias" should create a file in the alias directory. (Invalid argument)
error: unable to create file test/fast/Running "nvm current" should display current nvm environment. (Invalid argument)
error: unable to create file test/fast/Running "nvm deactivate" should unset the nvm environment variables. (Invalid argument)
error: unable to create file test/fast/Running "nvm install" with "--reinstall-packages-from" requires a valid version (Invalid argument)
error: unable to create file test/fast/Running "nvm install" with an invalid version fails nicely (Invalid argument)
error: unable to create file test/fast/Running "nvm unalias" should remove the alias file. (Invalid argument)
error: unable to create file test/fast/Running "nvm uninstall" should remove the appropriate directory. (Invalid argument)
error: unable to create file test/fast/Running "nvm uninstall" with incorrect file permissions fails nicely (Invalid argument)
error: unable to create file test/fast/Running "nvm unload" should unset all function and variables. (Invalid argument)
error: unable to create file test/fast/Running "nvm use foo" where "foo" is circular aborts (Invalid argument)
error: unable to create file test/fast/Running "nvm use iojs" uses latest io.js version (Invalid argument)
error: unable to create file test/fast/Running "nvm use system" should work as expected (Invalid argument)
error: unable to create file test/fast/Running "nvm use x" should create and change the "current" symlink (Invalid argument)
error: unable to create file test/fast/Running "nvm use x" should not create the "current" symlink if $NVM_SYMLINK_CURRENT is false (Invalid argument)
error: unable to create file test/slow/Running "nvm current" should display current nvm environment. (Invalid argument)
error: unable to create file test/slow/nvm exec/Preamble works and respects "silent" flag (Invalid argument)
error: unable to create file test/slow/nvm exec/Running "nvm exec --lts" should work (Invalid argument)
error: unable to create file test/slow/nvm exec/Running "nvm exec 0.x" should work (Invalid argument)
error: unable to create file test/slow/nvm exec/Running "nvm exec" should pick up .nvmrc version (Invalid argument)
error: unable to create file test/slow/nvm reinstall-packages/Running "nvm copy-packages $(nvm ls current)" should error out (Invalid argument)
error: unable to create file test/slow/nvm run/Running "nvm run --harmony --version" should work (Invalid argument)
error: unable to create file test/slow/nvm run/Running "nvm run --lts" should work (Invalid argument)
error: unable to create file test/slow/nvm run/Running "nvm run 0.x" should error out sensibly when 0.x is not installed (Invalid argument)
error: unable to create file test/slow/nvm run/Running "nvm run 0.x" should work (Invalid argument)
error: unable to create file test/slow/nvm run/Running "nvm run" should pick up .nvmrc version (Invalid argument)
error: unable to create file test/slow/nvm uninstall/Running "nvm uninstall 0.12.6" uninstalls v0.12.6 (Invalid argument)
error: unable to create file test/slow/nvm uninstall/Running "nvm uninstall" with incorrect file permissions fails nicely (Invalid argument)
error: unable to create file test/slow/nvm use/Running "nvm use --lts" uses latest LTS version (Invalid argument)
error: unable to create file test/slow/nvm use/Running "nvm use --lts=foo" uses latest "foo" LTS version (Invalid argument)
error: unable to create file test/slow/nvm use/Running "nvm use iojs" uses latest io.js version (Invalid argument)
error: unable to create file test/slow/nvm use/Running "nvm use node" uses latest stable node version (Invalid argument)
error: unable to create file test/slow/nvm use/Running "nvm use v1.0.0" uses iojs-v1.0.0 iojs version (Invalid argument)
error: unable to create file test/slow/nvm use/Running "nvm use" calls "nvm_die_on_prefix" (Invalid argument)
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Failed to clone nvm repo. Please report this!
nvm doesn't work in git bash, because it requires POSIX compliance. You need to be using BashOnWindows to use nvm on windows - otherwise, there's alternative Windows projects listed in the readme.
@ljharb thank u very much:)
Most helpful comment
nvmdoesn't work in git bash, because it requires POSIX compliance. You need to be using BashOnWindows to usenvmon windows - otherwise, there's alternative Windows projects listed in the readme.