OpenSuse
nvm debug output:
nvm --version: v0.37.1
$SHELL: /usr/bin/zsh
$SHLVL: 1
whoami: 'qomo'
${HOME}: /home/qomo
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${HOME}/.yarn/bin:${HOME}/.config/yarn/global/node_modules/.bin:${HOME}/apps/influxdb/usr/bin:${NVM_DIR}/versions/node/v10.16.0/bin:${HOME}/bin:/usr/local/bin:/usr/bin:/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.8 (x86_64-suse-linux-gnu)'
uname -a: 'Linux 5.9.8-2-default #1 SMP Thu Nov 12 07:43:32 UTC 2020 (ea93937) x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Welcome to openSUSE Tumbleweed 20201124 - Kernel ().
curl: /usr/bin/curl, curl 7.73.0 (x86_64-suse-linux-gnu) libcurl/7.73.0 OpenSSL/1.1.1h-fips zlib/1.2.11 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh/0.9.5/openssl/zlib nghttp2/1.41.0
wget: /usr/bin/wget, GNU Wget 1.20.3 built on linux-gnu.
git: /usr/bin/git, git version 2.29.2
ls: æ— æ³•è®¿é—® 'grep:': No such file or directory
grep: grep: aliased to grep --color=auto (grep --color=auto), grep (GNU grep) 3.5
awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0
sed: /usr/bin/sed, sed (GNU sed) 4.8
cut: /usr/bin/cut, cut (GNU coreutils) 8.32
basename: /usr/bin/basename, basename (GNU coreutils) 8.32
rm: /usr/bin/rm, rm (GNU coreutils) 8.32
mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.32
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.7.0
nvm current: v10.16.0
which node: ${NVM_DIR}/versions/node/v10.16.0/bin/node
which iojs: iojs not found
which npm: ${NVM_DIR}/versions/node/v10.16.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v10.16.0
npm root -g: ${NVM_DIR}/versions/node/v10.16.0/lib/node_modules
nvm ls output:
-> v10.16.0
default -> v10.16.0
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v10.16.0) (default)
stable -> 10.16 (-> v10.16.0) (default)
lts/* -> lts/fermium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.23.0 (-> N/A)
lts/erbium -> v12.20.0 (-> N/A)
lts/fermium -> v14.15.1 (-> N/A)
nvm?
install script in readme.
I just installed as said in readme.
Well, everything good. But everytime after opening terminal , I got these output:
grep: CloudMusic: Is a directory
grep: develop: Is a directory
grep: go: Is a directory
grep: matrix-blog: Is a directory
grep: ssqian: Is a directory
These directories are under my home directory.
It would not happen when I was working on manjaro-linux. If I commented these lines in .zshrc, above outputs disappeared.
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
So, how to hide these outputs?
PATH?export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export CLASSPATH=".:/usr/share/java/antlr-complete.jar:$CLASSPATH"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/apps/influxdb/usr/bin:$PATH"
I'm experiencing the same thing on Ubuntu 20.04.1 LTS after upgrading to NVM v0.37.1 - I had to manually roll back to v0.37.0
I have the same problem on archlinux with NVM v0.37.1 too
I can’t figure out why either of the two changes in v0.37.1 would have caused this. Perhaps #2347, cc @mdwint?
@qomosoloto this line in nvm debug is interesting: ls: æ— æ³•è®¿é—® 'grep:': No such file or directory. What do those characters mean?
@ivancevich @ArmanMazdaee for both of you as well, is it listing every directory inside your home dir with that error message?
@qomosoloto this line in
nvm debugis interesting:ls: æ— æ³•è®¿é—® 'grep:': No such file or directory. What do those characters mean?@ivancevich @ArmanMazdaee for both of you as well, is it listing every directory inside your home dir with that error message?
æ— æ³•è®¿é—® means can't access
@qomosoloto this line in
nvm debugis interesting:ls: æ— æ³•è®¿é—® 'grep:': No such file or directory. What do those characters mean?@ivancevich @ArmanMazdaee for both of you as well, is it listing every directory inside your home dir with that error message?
Now it is listing every directory inside any directory after excuting cd directory command...
I have the same problem on mac big sur 1.0.1 (20B29)
I found when I change
NVM_NPM_CONFIG_PREFIX_ENV="$(command env | nvm_grep -i ^NPM_CONFIG_PREFIX | command tail -1 | command awk -F '=' '{print $1}')"
to
NVM_NPM_CONFIG_PREFIX_ENV="$(command env | nvm_grep -i NPM_CONFIG_PREFIX | command tail -1 | command awk -F '=' '{print $1}')"
it's ok.
@zhengdai What's the output of command env?
@zhengdai What's the output of
command env?
TERM_SESSION_ID=w0t2p0:12B5D2DB-541F-43A2-B8C0-EBB9F752B78F
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.TSYOKXRhk9/Listeners
LC_TERMINAL_VERSION=3.4.2
COLORFGBG=7;0
ITERM_PROFILE=Default
SQLITE_EXEMPT_PATH_FROM_VNODE_GUARDS=/Users/zhengdai/Library/WebKit/Databases
XPC_FLAGS=0x0
LANG=zh_CN.UTF-8
PWD=/Users/zhengdai
SHELL=/bin/zsh
__CFBundleIdentifier=com.googlecode.iterm2
SECURITYSESSIONID=186a9
TERM_PROGRAM_VERSION=3.4.2
TERM_PROGRAM=iTerm.app
PATH=/Users/zhengdai/.nvm/versions/node/v15.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/zhengdai/project/go/bin:/usr/local/opt/fzf/bin
LC_TERMINAL=iTerm2
COLORTERM=truecolor
COMMAND_MODE=unix2003
TERM=xterm-256color
HOME=/Users/zhengdai
TMPDIR=/var/folders/1n/sd9vsnzx0_75d_7xhr9w12cr0000gn/T/
USER=zhengdai
XPC_SERVICE_NAME=0
LOGNAME=zhengdai
LaunchInstanceID=41CDF862-97BC-4805-9D4C-4053564340BE
__CF_USER_TEXT_ENCODING=0x0:25:52
ITERM_SESSION_ID=w0t2p0:12B5D2DB-541F-43A2-B8C0-EBB9F752B78F
SHLVL=1
OLDPWD=/Users/zhengdai
BROWSER=open
EDITOR=vim
VISUAL=nano
PAGER=less
LESS=-F -g -i -M -R -S -w -X -z-4
ZSH=/Users/zhengdai/.oh-my-zsh
LSCOLORS=Gxfxcxdxbxegedabagacad
ZNT_REPO_DIR=/Users/zhengdai/.oh-my-zsh/plugins/zsh-navigation-tools
ZNT_CONFIG_DIR=/Users/zhengdai/.config/znt
JAVA_8_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
JAVA_15_HOME=/usr/local/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/Home
JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
GO111MODULE=on
GOPROXY=https://goproxy.cn
GOPATH=/Users/zhengdai/project/go
LESS_TERMCAP_mb=
LESS_TERMCAP_md=
LESS_TERMCAP_me=
LESS_TERMCAP_se=
LESS_TERMCAP_so=
LESS_TERMCAP_ue=
LESS_TERMCAP_us=
LS_COLORS=di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:
GREP_COLOR=37;45
GREP_COLORS=mt=37;45
NVM_DIR=/Users/zhengdai/.nvm
NVM_CD_FLAGS=-q
NVM_BIN=/Users/zhengdai/.nvm/versions/node/v15.3.0/bin
NVM_INC=/Users/zhengdai/.nvm/versions/node/v15.3.0/include/node
NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
_=/usr/bin/env
@zhengdai Did you run command env inside of nvm.sh, right above the line you changed?
I don't understand how changing the ^ could have had an impact if command env doesn't even output any possible matches.
Sounds like i need to revert #2347 ASAP; I’ll do that and cut a release today. @mdwint, we’ll need to reopen a PR to try to fix the original issue, but add a regression test to cover this case too.
Also having this issue, manjaro linux
$ nvm debug
nvm --version: v0.37.1
$SHELL: /usr/bin/zsh
$SHLVL: 1
whoami: 'pauly'
${HOME}: /home/pauly
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${HOME}/.magento-cloud/bin:${HOME}/.phpenv/shims:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${HOME}/.magento-cloud/bin:${HOME}/.phpenv/shims:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${HOME}/.magento-cloud/bin:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${HOME}/.magento-cloud/bin:${HOME}/.phpenv/shims:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${HOME}/.phpenv/shims:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${HOME}/.magento-cloud/bin:${HOME}/.phpenv/shims:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${HOME}/.magento-cloud/bin:${HOME}/.phpenv/shims:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${HOME}/.magento-cloud/bin:${HOME}/.phpenv/shims:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/bin:${HOME}/.config/composer/vendor/bin:${HOME}/.phpenv/bin:/usr/local/bin:${HOME}/.yarn/bin:${NVM_DIR}/versions/node/v12.20.0/bin:${HOME}/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:${HOME}/.gem/ruby/2.7.0/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.8 (x86_64-pc-linux-gnu)'
uname -a: 'Linux 5.9.11-2-MANJARO #1 SMP PREEMPT Tue Nov 24 15:40:17 UTC 2020 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Manjaro Linux () ()
curl: /usr/bin/curl, curl 7.73.0 (x86_64-pc-linux-gnu) libcurl/7.73.0 OpenSSL/1.1.1h zlib/1.2.11 zstd/1.4.5 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
wget: /usr/bin/wget, GNU Wget 1.20.3 built on linux-gnu.
git: /usr/bin/git, git version 2.29.2
ls: cannot access 'grep:': No such file or directory
grep: grep: aliased to grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}), grep (GNU grep) 3.6
awk: /usr/bin/awk, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.0)
sed: /usr/bin/sed, sed (GNU sed) 4.8
cut: /usr/bin/cut, cut (GNU coreutils) 8.32
basename: /usr/bin/basename, basename (GNU coreutils) 8.32
rm: /usr/bin/rm, rm (GNU coreutils) 8.32
mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.32
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.7.0
nvm current: v12.20.0
which node: ${NVM_DIR}/versions/node/v12.20.0/bin/node
which iojs: iojs not found
which npm: ${NVM_DIR}/versions/node/v12.20.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v12.20.0
npm root -g: ${NVM_DIR}/versions/node/v12.20.0/lib/node_modules
Hmm, I'm unable to reproduce this in my local zsh on my (pre-big-sur) Mac in zsh.
@qomosoloto regardless, export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/apps/influxdb/usr/bin:$PATH" will break things - do that before sourcing nvm, so that nvm's node/npm/global modules always take precedence (especially over yarn's global modules).
I've gone ahead and reverted #2347, which will be released shortly as v0.7.2. Hopefully that solves the problem.
v0.7.2 is released. Please file a new issue if there's still problems.
Most helpful comment
v0.7.2 is released. Please file a new issue if there's still problems.