Error: Cannot find module ‘umi‘ 问题处理

在使用Ant Design时遇到找不到模块的错误?尝试使用`yarn add`命令来安装缺失模块。例如,运行`yarn add umi`可以解决umi模块的错误。此外,注意检查并升级可能不兼容或已废弃的依赖,如`core-js`、`react`等,确保项目稳定运行。
摘要由CSDN通过智能技术生成
最近接触ant design,再上手的时候,老是会碰到,找不到某某模块的问题,上网搜了一下,发现很多都不能解决问题。

后来,发现可以通过 yarn add 模块名 的方式,处理这种Error, 如:
yarn add umi

记录一下,希望也可以帮到您!
NangongYi@LAPTOP-AKD59FEP MINGW64 /d/web/html/ant/myapp
 $ yarn add umi
 yarn add v1.22.10
 info No lockfile found.
 [1/4] Resolving packages...
 warning @umijs/preset-react > @umijs/plugin-antd > antd-mobile > babel-runtime > core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
 warning @umijs/preset-react > @umijs/plugin-locale > react-intl > @formatjs/intl-unified-numberformat@3.3.7: We have renamed the package to @formatjs/intl-numberformat
 warning @umijs/preset-react > @umijs/plugin-locale > react-intl > intl-messageformat-parser@3.6.4: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
 warning @umijs/preset-react > @umijs/plugin-locale > react-intl > intl-messageformat > intl-messageformat-parser@3.6.4: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
 warning @umijs/preset-react > @umijs/plugin-locale > react-intl > intl-messageformat-parser > @formatjs/intl-unified-numberformat@3.3.7: We have renamed the package to @formatjs/intl-numberformat
 warning @umijs/preset-react > @umijs/plugin-antd > antd-mobile > rc-swipeout > react-native-swipeout@2.3.6: Package no longer supported. Use at your own risk or consider using https://github.com/software-mansion/react-native-gesture-handler
 warning @umijs/preset-react > @umijs/plugin-antd > antd-mobile > rmc-list-view > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-environment-jsdom-fourteen > @jest/environment > @jest/transform > jest-haste-map > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-environment-jsdom-fourteen > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-cli > jest-config > jest-environment-jsdom > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-environment-jsdom-fourteen > jsdom > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-cli > jest-config > jest-environment-jsdom > jsdom > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-environment-jsdom-fourteen > jsdom > request > har-validator@5.1.5: this library is no longer supported
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-environment-jsdom-fourteen > @jest/environment > @jest/transform > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
 warning @umijs/preset-react > @umijs/plugin-test > @umijs/test > jest-environment-jsdom-fourteen > @jest/environment > @jest/transform > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
 [2/4] Fetching packages...
 info fsevents@2.3.2: The platform "win32" is incompatible with this module.
 info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
 info fsevents@1.2.13: The platform "win32" is incompatible with this module.
 info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
 [3/4] Linking dependencies...
 warning " > @ant-design/pro-layout@6.17.0" has unmet peer dependency "antd@^4.x".
 warning "@ant-design/pro-layout > @ant-design/pro-utils@1.16.3" has unmet peer dependency "antd@4.x".
 warning "@ant-design/pro-layout > @ant-design/pro-provider@1.4.11" has unmet peer dependency "antd@4.x".
 warning "@ant-design/p
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值