zsh - sh: node: command not found

469 views Asked by At

I am using zsh and I already installed node. In my terminal, when I key in:

$ node -v

I will get v12.14.1, that means my macbook already have node installed.

but when I do:

npm install -g @vue/cli

I got:

... env: node: No such file or directory ... sh: node: command not found ...

I googled a bit and was advise to add this line to .zshrc:

export PATH=$HOME/bin:/usr/local/bin:$PATH

but still not working.

another suggestion:

source /Users/xuanxi2020/.bash_profile

too, not working. Any other way to fix this?

0

There are 0 answers