ubuntu下安装vue/cli提示No command 'vue' found
程序员文章站
2022-04-21 16:40:44
通过官方指令 npm install -g @vue/cli 安装vue脚手架提示: No command 'vue' found, did you mean: Command 'vpe' from package 'texlive-latex-extra' (universe)vue: comma ......
通过官方指令
npm install -g @vue/cli
安装vue脚手架提示:
no command 'vue' found, did you mean:
command 'vpe' from package 'texlive-latex-extra' (universe)
vue: command not found
解决方法:
- back up your computer.
- on the command line, in your home directory, create a directory for global installations:
mkdir ~/.npm-global
- configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
- in your preferred text editor, open or create a
~/.profile
file and add this line:export path=~/.npm-global/bin:$path
- on the command line, update your system variables:
source ~/.profile
- to test your new configuration, install a package globally without using
sudo
:npm install -g jshint
instead of steps 2-4, you can use the corresponding env variable (e.g. if you don’t want to modify ~/.profile
):
npm_config_prefix=~/.npm-global
上一篇: 忙碌的妈妈
下一篇: 女人常说的话的经典阐释