收藏
回答

开发者工具预览时白屏报错,工具内运行正常

框架类型 问题类型 操作系统 工具版本
小游戏 Bug Windows 微信调试基础库:2.11.3(灰度) cocos creator V2.3.4

开发工具:cocos.creator V2.3.4

微信调试基础库:2.11.3(灰度)

手机型号:苹果7 PLUS

微信版本:7.0.13

IOS版本:13.5.1

问题:开发者工具运行正常,点击预览生成二维码,扫码后手机上报错

开发ID: wx9f94bceefc8b252c

报错详情:

MiniProgramError

TypeError

TypeError: Function("r", "regeneratorRuntime = r") is not a function. (In 'Function("r", "regeneratorRuntime = r")(r)', 'Function("r", "regeneratorRuntime = r")' is undefined) 

at  (src/project.js:1:306926)

at call (src/project.js:1:38590)

at n (src/project.js:1:300726)

at call (src/project.js:1:38590)

at t (src/project.js:1:38276)

at  (src/project.js:1:38422)

at call (src/project.js:1:289)

at o (src/project.js:1:451)

at  (src/project.js:1:468)

at require (WAGameSubContext.js:2:87270)

at  (WAGameSubContext.js:2:86649)

at require (ccRequire.js:5:5)

at func (ccRequire.js:11:11)

at __cocos_require__ (adapter-min.js:1:8935)

at  (game.js:2003:622539)

at a (game.js:2003:636208)

at a (game.js:2003:636467)

at a (game.js:2003:636467)

at a (game.js:2003:636467)

at a (game.js:2003:636467)

at  (game.js:2003:637355)

at  (game.js:2003:631221)

at  (game.js:2003:610519)

at prepare (game.js:2003:285159)

at run (game.js:2003:285404)

at run (main.js:112:11)

at boot (game.js:43:8)

at require (WAGameSubContext.js:2:87270)

at global code (game.js:16881:17)

at  (native code)

at value (WAGame.js:2:455693)

at  (WAGame.js:2:453482)

at map (native code)

at value (WAGame.js:2:453442)

at l (WAGame.js:2:468776)

at  (WAGame.js:2:475936)

at d (WAGame.js:2:461383)

at  (WAGame.js:2:461175)

at c (WAGame.js:2:449986)

at i (WAGame.js:2:450189)

at  (WAGame.js:2:450248)

at A (WAGame.js:2:67054)

at  (WAGame.js:2:450140)

at  (WAGame.js:2:448635)

at d (WAGame.js:2:461383)

at  (WAGame.js:2:461175)

at c (WAGame.js:2:449986)

at i (WAGame.js:2:450189)

at  (WAGame.js:2:450248)

at A (WAGame.js:2:67054)

at  (WAGame.js:2:450140)

at  (WAGame.js:2:448956)

at W (WAGame.js:2:475782)

at  (WAGame.js:2:475413)

at d (WAGame.js:2:461383)

at  (WAGame.js:2:461175)

at c (WAGame.js:2:449986)

at i (WAGame.js:2:450189)

at  (WAGame.js:2:450248)

at A (WAGame.js:2:67054)

at  (WAGame.js:2:450140)

at h (WAGame.js:2:80061)

at  (WAGame.js:2:81774)

at forEach (native code)

at m (WAGame.js:2:81760)

at  (WAGame.js:2:83043)

at  (WAGame.js:2:71097)

at forEach (native code)

at value (WAGame.js:2:71067)

at value (native code)

at l (native code)

at _ (WAGame.js:2:82943)

at  (WAGame.js:2:71097)

at forEach (native code)

at value (WAGame.js:2:71067)

at value (native code)

at l (native code)

at  (WAGame.js:2:74810)

at global code (WAGame.js:16:61)

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

4 个回答

  • 小程序技术专员-binnie
    小程序技术专员-binnie
    2020-06-29

    推下2.11.2看看正常不

    2020-06-29
    有用
    回复 2
    • 何三
      何三
      2020-06-29
      感谢及时回复我的问题!问题解决了,折腾creator下云端环境时,把网络上的tcbjs.js文件给丢到本地script里了,可能里面有一些代码引用了不知道什么东西........
      2020-06-29
      回复
    • 何三
      何三
      2020-06-29
      感谢及时回复我的问题!问题解决了,折腾creator下云端环境时,把网络上的tcbjs.js文件给丢到本地script里了,可能里面有一些代码引用了不知道什么东西........
      2020-06-29
      回复
  • 晓寒
    晓寒
    2020-07-22

    这个选项去掉

    2020-07-22
    有用
    回复
  • y
    y
    2020-07-14

    同样遇到这问题

    2020-07-14
    有用
    回复 3
    • 何三
      何三
      2020-07-14
      查看下代码,是否有奇怪的文件混了进去
      2020-07-14
      回复
    • y
      y
      2020-07-14回复何三
      发现是babel把async编译了
      2020-07-14
      回复
    • 何三
      何三
      2020-07-14
      babel这东西我不懂,async这一套东西经常编译报错.
      2020-07-14
      回复
  • 何三
    何三
    2020-06-29

    首先感谢这么及时回答我的问题!太感动

    更换了,仍然还是该错误.

    网上查资料说是应该引用import regeneratorRuntime from '../../utils/runtime.js'

    安装regerator拷贝runtime.js到项目里,每个文件都引用它,打包后仍然报这个错误.

    2020-06-29
    有用
    回复
登录 后发表内容
问题标签