ant-design / ant-design-pro

👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
https://pro.ant.design
MIT License
36.51k stars 8.15k forks source link

🧐[问题]Jenkins部署报错 error in ./src/.umi-production/core/routes.ts #9190

Closed xlszzck closed 3 years ago

xlszzck commented 3 years ago

🧐 问题描述

本地打包没问题 但是在Jenkins部署报错,不知道该从哪儿入手调整,不知道是不是dockerfile配置错了

💻 报错提示

puppeteer-core@1.12.2 install /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/carlo/node_modules/puppeteer-core node install.js

core-js@2.6.12 postinstall /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/babel-runtime/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"

core-js@3.6.5 postinstall /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"

core-js-pure@3.18.2 postinstall /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/core-js-pure node -e "try{require('./postinstall')}catch(e){}"

ejs@2.7.4 postinstall /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/ejs node ./postinstall.js

esbuild@0.12.15 postinstall /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/esbuild node install.js

esbuild@0.8.57 postinstall /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/esbuild-loader/node_modules/esbuild node install.js

npm WARN lifecycle ant-design-pro@5.0.0~postinstall: cannot run in wd ant-design-pro@5.0.0 umi g tmp (wd=/var/lib/jenkins/workspace/ant-design-pro-master) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-environment-jsdom-fourteen/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 2059 packages from 1130 contributors in 43.162s

Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating [success] [webpackbar] Webpack: Compiled with some errors in 1.02m ERROR Failed to compile with 1 errors1:57:15 PM

error in ./src/.umi-production/core/routes.ts

Module not found: Error: Can't resolve '/var/lib/jenkins/workspace/ant-design-pro-master/src/pages/user/Login' in '/var/lib/jenkins/workspace/ant-design-pro-master/src/.umi-production/core'

ERROR in ./src/.umi-production/core/routes.ts 26:21-28:86 Module not found: Error: Can't resolve '/var/lib/jenkins/workspace/ant-design-pro-master/src/pages/user/Login' in '/var/lib/jenkins/workspace/ant-design-pro-master/src/.umi-production/core' @ ./src/.umi-production/umi.ts 9:0-42 25:33-42

webpack compiled with 1 error null build failed Error: build failed at /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/@umijs/bundler-webpack/lib/index.js:172:29 at /var/lib/jenkins/workspace/ant-design-pro-master/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:114591:14 at processQueueWorker (/var/lib/jenkins/workspace/ant-design-pro-master/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:114529:6) at processTicksAndRejections (internal/process/task_queues.js:75:11) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

github-actions[bot] commented 3 years ago

当前 Issue 未检测到标题,请规范填写,谢谢!

The title of the current issue is not detected, please fill in according to the specifications, thank you!