ant-design / codemod-v5

codemod cli for antd v5 upgrade
MIT License
17 stars 7 forks source link

~antd/es/style/themes/default.less not find #50

Open hzhijun opened 1 year ago

hzhijun commented 1 year ago

✖ Webpack Compiled with some errors in 10.79s

ERROR Failed to compile with 1 errors 12:29:23

error in ./src/.umi/plugin-layout/layout/layout/style.less

Module build failed (from ./node_modules/@umijs/bundler-webpack/lib/webpack/plugins/mini-css-extract-plugin/src/loader.js): ModuleBuildError: Module build failed (from ./node_modules/@umijs/deps/compiled/less-loader/cjs.js):

@import '~antd/es/style/themes/default.less'; ^ ENOENT: no such file or directory, open '/Users/admin/frontend/node_modules/antd/es/style/themes/default.less' in /Users/admin/frontend/src/.umi/plugin-layout/layout/layout/style.less (line 1, column 0) at /Users/admin/frontend/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:105544:20 at /Users/admin/frontend/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:47997:11 at /Users/admin/frontend/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:47863:18 at context.callback (/Users/admin/frontend/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:47741:13) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5)

@ ./src/.umi/plugin-layout/layout/layout/index.tsx 12:0-22 @ ./src/.umi/plugin-layout/Layout.tsx @ ./src/.umi/core/routes.ts @ ./src/.umi/umi.ts @ multi ./src/.umi/umi.ts

hzhijun commented 1 year ago

本地执行 npx -p @ant-design/codemod-v5 antd5-codemod src 命令,将 antd 从 4.0 升级到 5.0,使用 yarn start 命令启动服务报错。 提示 antd/es/style/themes/default.less 找不到。

vagusX commented 1 year ago

本地执行 npx -p @ant-design/codemod-v5 antd5-codemod src 命令,将 antd 从 4.0 升级到 5.0,使用 yarn start 命令启动服务报错。

提示 antd/es/style/themes/default.less 找不到。

这个文件迁移完还有引用嘛? umi 是什么版本呀?