美文网首页
Vue3安装@vue/cli报错EEXIST: file alr

Vue3安装@vue/cli报错EEXIST: file alr

作者: 前端技术小咖 | 来源:发表于2021-04-14 00:09 被阅读0次

    电脑中之前安装过Vue2的vue/cli,今天尝试安装Vue3的@vue/cli便发生以下报错:

    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
    npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
    npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated har-validator@5.1.5: this
    npm ERR! code EEXIST
    npm ERR! syscall symlink
    npm ERR! path ../lib/node_modules/@vue/cli/bin/vue.js
    npm ERR! dest /usr/local/bin/vue
    npm ERR! errno -17
    npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/@vue/cli/bin/vue.js' -> '/usr/local/bin/vue'
    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/shuaitao/.npm/_logs/2021-04-13T15_55_21_717Z-debug.log
    

    仔细看了以下错误,原因是/usr/local/bin/vue文件已经存在,执行删除命令后再执行安装命令即可:

    sudo rm -rf /usr/local/bin/vue
    sudo npm install -g @vue/cli
    

    相关文章

      网友评论

          本文标题:Vue3安装@vue/cli报错EEXIST: file alr

          本文链接:https://www.haomeiwen.com/subject/nzihlltx.html