当前位置: 移动技术网 > IT编程>开发语言>JavaScript > ubuntu下安装vue/cli提示No command 'vue' found

ubuntu下安装vue/cli提示No command 'vue' found

2019年10月16日  | 移动技术网IT编程  | 我要评论

通过官方指令

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

解决方法:

  1. back up your computer.
  2. on the command line, in your home directory, create a directory for global installations:
     mkdir ~/.npm-global
    
  3. configure npm to use the new directory path:
     npm config set prefix '~/.npm-global'
    
  4. in your preferred text editor, open or create a ~/.profile file and add this line:
     export path=~/.npm-global/bin:$path
    
  5. on the command line, update your system variables:
     source ~/.profile
    
  6. 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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网