4.npm ERR! code EEXIST npm ERR!

2021-12-13  本文已影响0人  冰点雨

安装脚手架报错信息

npm ERR! code EEXIST
npm ERR! path /usr/local/bin/vue
npm ERR! EEXIST: file already exists
npm ERR! File exists: /usr/local/bin/vue
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mac/.npm/_logs/2021-12-13T09_03_21_930Z-debug.log
mac@gjr ~ % cd  /Users/mac/Desktop/vue 
mac@gjr vue % vue  create vue_test

  vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
  You may want to run the following to upgrade to Vue CLI 3:

  npm uninstall -g vue-cli
  npm install -g @vue/cli

原因

安装的Vue版本过低

解决方法

尝试用提示的命令解决,还不能成功

  npm install -g @vue/cli

用以下命令强制覆盖以前旧版本的vue-cli脚手架

npm install -g @vue/cli --force  
上一篇 下一篇

猜你喜欢

热点阅读