环境:
MacOS Catalina 10.15.1
问题:
命令安装vue-cli:sudo npm install --global vue-cli
安装成功后,执行:vue -V
报错提示:-bash: vue: command not found
解决办法:
查看路径:/usr/local/Cellar/node/7.1.0/bin/
下是否有node,路径中的数字可能不一样,根据实际情况而定,如果有node
命令行窗口执行:export PATH="$PATH:/usr/local/Cellar/node/7.1.0/bin"
再执行:source ~/.bash_profile
再执行:vue -V
就能正常显示vue版本了
Comments | NOTHING