美文网首页
Jenkins构建vue项目过程中出现的问题(nodejs版本太

Jenkins构建vue项目过程中出现的问题(nodejs版本太

作者: 肉包君 | 来源:发表于2020-07-27 17:53 被阅读0次

    2020-07-27

    Jenkins构建vue项目过程中出现的问题

    报错:

    Build failed with errors.
    
    npm ERR! Linux 3.10.0-957.el7.x86_64
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
    npm ERR! node v6.17.1
    npm ERR! npm  v3.10.10
    npm ERR! code ELIFECYCLE
    npm ERR! lp-mall@1.0.0 build: `node build/build.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the lp-mall@1.0.0 build script 'node build/build.js'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the lp-mall package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node build/build.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs lp-mall
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls lp-mall
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /root/.jenkins/workspace/mall-test/npm-debug.log
    

    原因:nodejs版本太低

    解决:nodejs升级到最新版本

    node -v     #查看当前版本
    npm install -g n      #安装n,n是管理nodejs的工具,-g 全局
    n latest     #升级nodejs到最新版本
    
    n stable     #安装最新稳定版
    n rm 6.17.1       #删除某个版本
    n 14.5.0        #安装某个版本
    

    相关文章

      网友评论

          本文标题:Jenkins构建vue项目过程中出现的问题(nodejs版本太

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