账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    jenkins 打包报错npm ERR! code ELIFECYCLE
    60
    0
    + whoamiroot+ npm run build> web@0.1.1 build /var/lib/jenkins/workspace/web> react-app-rewired buildCreating an optimized production build...Treating warnings as errors because process.env.CI = true.Most CI servers set it automatically.Failed to compile.chunk 6 [mini-css-extract-plugin]Conflicting order. Following module has been added: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ScreenMember/index.lessdespite it was not able to fulfill desired ordering with these modules: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ScreenProject/index.less - couldn't fulfill desired order of chunk group(s) - while fulfilling desired order of chunk group(s) , ,chunk 6 [mini-css-extract-plugin]Conflicting order. Following module has been added: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ChoiceMember/index.lessdespite it was not able to fulfill desired ordering with these modules: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ScreenProject/index.less - couldn't fulfill desired order of chunk group(s) - while fulfilling desired order of chunk group(s) , ,npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! curvature-platform-web@0.1.1 build: `react-app-rewired build`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the web@0.1.1 build script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/2021-11-28T15_42_06_584Z-debug.logBuild step 'Execute shell' marked build as failureFinished: FAILURE特别诡异,我jenkins里whoami 是root;但是我通过ssh登录root用户到这个目录,运行build命令就成功了。Creating an optimized production build...Compiled with warnings.chunk 6 [mini-css-extract-plugin]Conflicting order. Following module has been added: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ScreenMember/index.lessdespite it was not able to fulfill desired ordering with these modules: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ScreenProject/index.less - couldn't fulfill desired order of chunk group(s) - while fulfilling desired order of chunk group(s) , ,chunk 6 [mini-css-extract-plugin]Conflicting order. Following module has been added: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ChoiceMember/index.lessdespite it was not able to fulfill desired ordering with these modules: * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--5-oneOf-8-3!./src/components/ScreenProject/index.less - couldn't fulfill desired order of chunk group(s) - while fulfilling desired order of chunk group(s) , ,Search for the keywords to learn more about each warning.To ignore, add // eslint-disable-next-line to the line before.File sizes after gzip:1.07 MB build/static/js/16.0b28738f.chunk.js 276.92 KB build/static/js/0.aeb2730e.chunk.js 239.15 KB build/static/js/main.8807acc6.chunk.js 232.37 KB build/static/js/17.0577e11c.chunk.jsThe bundle size is significantly larger than recommended.Consider reducing it with code splitting: https://goo.gl/9VhYWBYou can also analyze the project dependencies: https://goo.gl/LeUzfbThe project was built assuming it is hosted at /.You can control this with the homepage field in your package.json.The build folder is ready to be deployed.You may serve it with a static server: yarn global add serve serve -s buildFind out more about deployment here: bit.ly/CRA-deployhelp!这个有哪些可能导致这个原因?求大佬帮助
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 时光疏离年华 普通会员 1楼

      这个错误信息表示Jenkins在执行打包任务时遇到了问题。具体来说,npm(Node Package Manager)在这个错误消息中显示了错误代码ELIFECYCLE,这可能表示在安装、更新或卸载某个npm包时发生了错误。 要解决这个问题,可以尝试以下步骤:

      1. 确保Jenkins已经安装了npm包。如果尚未安装,可以通过npm install命令安装。
      2. 检查Jenkins的npm包列表,确保所有的npm包都在其中。如果某个包不在列表中,可以尝试添加或卸载该包。
      3. 确保Jenkins正在运行并可以访问npm包的URL。如果Jenkins未启动或正在运行,可以尝试启动Jenkins或重启。
      4. 如果以上步骤都无法解决问题,可以尝试联系Jenkins的管理员或技术支持团队,寻求帮助。

      希望这些建议能帮助你解决问题。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部