收藏
回答

"@babel/runtime/regenerator.js" is not defined ?

升级到 1.06.2304182 及以后版本会出现

回答关注问题邀请回答
收藏

2 个回答

  • 工号9527
    工号9527
    2023-04-18

    清除编译缓存

    2023-04-18
    有用
    回复
  • 双
    02-18

    清除编译缓存 这个方法太牛了。

    昨天按照一本教材上的例子一步步写好了一个小程序,编译报错,Error: module '@babel/runtime/helpers/toConsumableArray.js' is not defined, require args is '../../@babel/runtime/helpers/toConsumableArray'

    具体的问题是在这一句上

    this.setData({          shopList:[...this.data.shopList, ...res.data],        })

    因为使用了三个点(…),真名叫扩展运算符,编译时会报上面的错误,注释掉这一行就不报错。百度了一天也没解决。今天偶然看到这个贴子,试着清除了编译缓存,问题一下子解决了,真是够奇怪的。

    02-18
    有用
    回复
登录 后发表内容