Skip to content
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

Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime' #5227

Closed
lunhui1994 opened this issue May 24, 2022 · 14 comments
Closed

Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime' #5227

lunhui1994 opened this issue May 24, 2022 · 14 comments
Labels

Comments

@lunhui1994
Copy link

lunhui1994 commented May 24, 2022

Version of antd-mobile

5.12.6

Operating system and its version

No response

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

通过别名的方式安装
"antd-mobile-v5": "npm:antd-mobile@^5.2.2",

固定版本号为5.2.2就不会出现这个问题了,但是是因为今天(5.24)才出现该问题,可能更新的版本也是正常的。

能确定的出问题的版本是5.12.6(lock文件中的版本)。

具体的报错信息是:Module not found: Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime' in '/xxx/node_modules/rc-field-form/es/utils'

无法直接安装 @babel/runtime/helpers/esm/regeneratorRuntime 会失败。

Relevant log output

No response

@lunhui1994 lunhui1994 added the bug label May 24, 2022
@awmleer awmleer added the pending Need more information to continue label May 24, 2022
@github-actions
Copy link
Contributor

Hi, lunhui1994.

It seems that this issue is a bit vague and lacks some necessary information. It is recommended to read How To Ask Questions The Smart Way.

看起来这条 issue 描述得有些模糊,缺少一些必要的信息,推荐阅读一下提问指引

@xiaohaoo
Copy link

我也遇到了相似的问题,在升级5.12.6以后出现Module not found: Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime',经过我的多次试验,首先在package.json去除antd-mobile依赖安装好其他依赖,然后再安装antd-mobile就不会报错!

@lunhui1994
Copy link
Author

我也遇到了相似的问题,在升级5.12.6以后出现Module not found: Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime',经过我的多次试验,首先在package.json去除antd-mobile依赖安装好其他依赖,然后再安装antd-mobile就不会报错!

我把版本号固定了,分开安装的话编译打包就很尴尬了。

@LJJCherry
Copy link

遇到了同样的问题

@javaxiu
Copy link

javaxiu commented May 24, 2022

我们无法修改 antd-mobile 的 package 加 resolution 锁版本,那是不是只能锁 antd-mobile 的版本了

@LJJCherry
Copy link

我也遇到了相似的问题,在升级5.12.6以后出现Module not found: Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime',经过我的多次试验,首先在package.json去除antd-mobile依赖安装好其他依赖,然后再安装antd-mobile就不会报错!

我是新加的包,按理说也是你这种操作流程,同样报这个错

@lunhui1994
Copy link
Author

我也遇到了相似的问题,在升级5.12.6以后出现Module not found: Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime',经过我的多次试验,首先在package.json去除antd-mobile依赖安装好其他依赖,然后再安装antd-mobile就不会报错!

我是新加的包,按理说也是你这种操作流程,同样报这个错

先试试5.12.6之前的版本吧,固定版本号先用。

@awmleer
Copy link
Member

awmleer commented May 24, 2022

看起来是 rc-field-form 的问题?

@awmleer
Copy link
Member

awmleer commented May 24, 2022

先手动在 package.json 里加一下 resolutions 吧:

{
  "resolutions": {
    "rc-field-form": "1.26.4"
  },
}

@awmleer awmleer removed the pending Need more information to continue label May 24, 2022
@awmleer
Copy link
Member

awmleer commented May 24, 2022

来自 rc-field-form 中的这条评论:

react-component/field-form#445 (comment)

@awmleer
Copy link
Member

awmleer commented May 24, 2022

还可以试一下在自己的项目中手动安装 @babel/runtime ^7.18.0 版本,应该可以临时解决这个问题,等后面 rc-field-form 修复之后再去掉

@awmleer
Copy link
Member

awmleer commented May 24, 2022

噢 rc-field-form 已经发布了,那直接重装一下依赖到最新版就可以了(如果有 lock 文件的话,可以先删掉 antd-mobile 再重装,避免 upgrade 不到深层的依赖)

@awmleer
Copy link
Member

awmleer commented May 24, 2022

issue 我先关闭了,各位朋友如果发现重装依赖之后还不行的话,可以再继续在这里反馈

@awmleer awmleer closed this as completed May 24, 2022
@LJJCherry
Copy link

来自 rc-field-form 中的这条评论:

react-component/field-form#445 (comment)

我也看到了,正想来贴,react-component/field-form#445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants