You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: ENOENT: no such file or directory, open '/Users/apple/work/webpack_demo/umi_test/dist/umi.js'
at Object.readFileSync (node:fs:448:20)
at /Users/apple/work/webpack_demo/umi_test/node_modules/.pnpm/@umijs+preset-umi@4.4.2_@types+node@22.10.2_@types+react@18.3.18_lightningcss@1.22.1_rollup@3_ng7m7upxtdhc7emxlvumhpdrnq/node_modules/@umijs/preset-umi/dist/utils/fileSizeReporter.js:51:39
at Array.map (<anonymous>)
at printFileSizesAfterBuild (/Users/apple/work/webpack_demo/umi_test/node_modules/.pnpm/@umijs+preset-umi@4.4.2_@types+node@22.10.2_@types+react@18.3.18_lightningcss@1.22.1_rollup@3_ng7m7upxtdhc7emxlvumhpdrnq/node_modules/@umijs/preset-umi/dist/utils/fileSizeReporter.js:50:148)
at Command.fn (/Users/apple/work/webpack_demo/umi_test/node_modules/.pnpm/@umijs+preset-umi@4.4.2_@types+node@22.10.2_@types+react@18.3.18_lightningcss@1.22.1_rollup@3_ng7m7upxtdhc7emxlvumhpdrnq/node_modules/@umijs/preset-umi/dist/commands/build.js:157:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Service.run (/Users/apple/work/webpack_demo/umi_test/node_modules/.pnpm/@umijs+core@4.4.2/node_modules/@umijs/core/dist/service/service.js:328:15)
at async Service.run2 (/Users/apple/work/webpack_demo/umi_test/node_modules/.pnpm/umi@4.4.2_@babel+core@7.26.0_@types+node@22.10.2_@types+react@18.3.18_eslint@8.57.1_lightning_dbwiaswoc4nj7wkc27nkgno3ie/node_modules/umi/dist/service/service.js:65:12)
at async Object.run (/Users/apple/work/webpack_demo/umi_test/node_modules/.pnpm/umi@4.4.2_@babel+core@7.26.0_@types+node@22.10.2_@types+react@18.3.18_eslint@8.57.1_lightning_dbwiaswoc4nj7wkc27nkgno3ie/node_modules/umi/dist/cli/cli.js:56:7) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/apple/work/webpack_demo/umi_test/dist/umi.js'
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
如题,这样配置的的时候出错了。我不清楚这是我webpack配置出错了,还是umi的问题。
配置
.umirc.ts
构建使用的命令
umi build
构建过程出现的问题
为什么要这样做
我想要编译时,产物每次都会在一个新的static_[hash]目录下。发布的时候,直接将这个构建产物目录推送到oss,与老的构建产物目录共存,以达到非覆盖式推送的目的。 如果有更好的解决方案请告诉我
如何重新
配置 .umirc.ts文件内的outputPath
Beta Was this translation helpful? Give feedback.
All reactions