-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [BUG] Ant Design Pro with Umi3 No Longer Compiles #10829
Comments
蹲 |
把 ./src/components/index.md 删了试试 |
我今天也是遇到了这个问题,不知道咋回事 |
This worked for me, thanks. However this is a temporary fix for a problem within Umi 这对我有用,谢谢。然而,这只是Umi问题的临时解决方案 |
今天,我想着选用umi4创建,发现可以启动了 |
确实,看上去是可以运行,但是编译又有一个错误 |
我也遇到了umi版本是3.50之前是好的,我是因为删除了nodemodules,重新安装依赖导致的同样的问题,个人感觉是umi依赖的包可能改变了,因为在4的版本默认已经没有这个md文件了,删掉是能解决,也尝试过关闭mfsu,不知道是不是这样 |
解决方案:删除index.md,把依赖删掉和umi文件夹删除,yarn一下,然后运行 |
试一下把browserslist版本固定到4.21.9以下(不包括),相关PR:babel/babel#15727 |
同样的问题,关注 |
fcous |
Please pin browserslist to As umit 3 is not maintained, the I suggest pin all your dev dependencies before you migrate to umi 4. |
同样问题,关注 |
1 similar comment
同样问题,关注 |
遇到同样的问题,关注😶🌫️ |
@PeachScript 看看是不是最近改了啥? |
看报错是 browserslist 版本和预打包的 babel 版本对不上导致的,Umi 3 需要升下 babel,这周处理下 |
遇到了同样的问题 |
方案改为锁定 dumi v1 的 babel 版本并为 demo 编译禁用
The solution is lock babel version for dumi v1, and ignore |
还是不行 |
感谢反馈,我重新创建脚手架试了下的确有问题,原因是 package.json 中的 browserslist 配置影响了 targets 值引发报错;dumi 发了 |
首先,根据报错信息,提示说'opera_mobile'不是一个有效的目标,建议将其更改为'opera'。然后,我们需要升级Ant Design Pro的版本到5.0.3。可以按照以下步骤来解决该问题:
这样应该就能够成功编译并在localhost:8000上进行访问了。 另外,根据附带的信息,Ant Design Pro的最新版本是5.0.3,其中包含了一些bug修复和改进。所以也可以尝试升级Ant Design Pro的版本到最新版本,以获得更好的稳定性和性能。 希望以上解决方案能够帮助你解决问题!如果还有其他疑问,请随时提问。 |
🐛 bug 描述
Ant Design Pro with Umi3 no longer compiles. Upon yarn install, and yarn start, it fails with @babel/helper-compilation-targets: 'opera_mobile' is not a valid target. This has made our company's production app that we built off of the antd umi3 template unable to build anymore and has stopped us from making any further releases to our customers.
📷 复现步骤 | Recurrence steps
Env: Tried both Node v16.16.0 and v18.5.0 but did not work
yarn v1.22.17
Select use umi@3
🏞 期望结果 | Expected results
Should have compiled and host at localhost:8000
💻 复现代码 | Recurrence code
© 版本信息
🚑 其他信息
The text was updated successfully, but these errors were encountered: