lukechilds / zsh-nvm

Zsh plugin for installing, updating and loading nvm
MIT License
2.24k stars 113 forks source link

"command not found: CONTRIBUTING.md" on setup #45

Closed laurentsenta closed 6 years ago

laurentsenta commented 6 years ago

Thanks for sharing & maintaining this tool! I had a surprising error message on startup:

I install'd zsh-nvm with the manual process from https://github.com/lukechilds/zsh-nvm#manually

I got the following logs when I opened a new shell:

Installing nvm...
Cloning into '/Users/laurent/.nvm'...
remote: Counting objects: 6886, done.
remote: Total 6886 (delta 0), reused 0 (delta 0), pack-reused 6886
Receiving objects: 100% (6886/6886), 2.11 MiB | 656.00 KiB/s, done.
Resolving deltas: 100% (4312/4312), done.
error: pathspec 'CONTRIBUTING.md Dockerfile LICENSE.md Makefile README.md ROADMAP.md bash_completion install.sh nvm-exec nvm.sh package.json test update_test_mocks.sh v0.33.8' did not match any file(s) known to git.
_zsh_nvm_install:3: command not found: CONTRIBUTING.md

It's not critical: nvm seems to work, but I can't tell whether the setup is complete or not.

lukechilds commented 6 years ago

Thanks! And thanks for taking the time to file a bug report.

Very odd, seems to be caused by this line: https://github.com/lukechilds/zsh-nvm/blob/master/zsh-nvm.plugin.zsh#L22

Which is calling this command: https://github.com/lukechilds/zsh-nvm/blob/master/zsh-nvm.plugin.zsh#L16

The failure probably just means you're running nvm on the latest master commit rather than checking out the latest release tag. So not a major issue but best to try and get it sorted.

What version OS/zsh/git are you running?

If you're on old versions can you try updating to recent versions of zsh/git?

Then nuke your nvm dir with rm -rf $NVM_DIR. (You'll lose all your installed node versions and global packages.)

Then start a new terminal session and it should retry the installation and hopefully succeed.

laurentsenta commented 6 years ago

Sorry for the false alarm, I have an alias that echo ls the current folder after a cd, I disabled it and the setup worked! Thanks for investigating this and describing the source of the issue!