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

微信 web 开发者工具更新后,代码报错 #1

Open
lys623 opened this issue Oct 12, 2016 · 7 comments
Open

微信 web 开发者工具更新后,代码报错 #1

lys623 opened this issue Oct 12, 2016 · 7 comments

Comments

@lys623
Copy link

lys623 commented Oct 12, 2016

Uncaught ReferenceError: regeneratorRuntime is not defined

@lys623
Copy link
Author

lys623 commented Oct 12, 2016

image

@wander112900
Copy link

我也遇到同样的问题。如何解决?

@allegrofb
Copy link

allegrofb commented Oct 14, 2016

一样的问题,自动更新以后,就出现问题了。关掉 es6转es5就可以了

@EGBAR
Copy link

EGBAR commented Nov 15, 2016

Any one HELP?
一开始也是上面的问题,ReferenceError。 然后感谢 @allegrofb , 关掉es6 to es5 就可以正常在模拟器里运行了。 但是当我扫描手机预览的时候。无论如何也点不进“开始游戏”的按钮, 于是乎手机打开调试模式,查看系统log。 如下:
wechat

这个是一个两难呀! 打开Es6 to Es5 没法连接服务器,但是手机可以点到game页面。 关掉Es6 to Es5 正常了,但是手机上没法用。

@Jiasm
Copy link

Jiasm commented Nov 21, 2016

手机一般来讲都还没有支持generator,这个问题应该是微信使用的编译器的问题。我觉得可以尝试下自己用webpack或者gulp编译。。或者放弃generator-.-

@lichunqiang
Copy link

关了 es6 转 es5 又爆出Promise的错误,

image

怎么搞...

@rocklee889
Copy link

这个问题我解决了,把调试里面es6转es5关掉,然后去npm安装一个regenerator把里面的 regenerator-runtime.js 放到lib目录里面 在代码里面引入
const regeneratorRuntime = require('../../libs/regenerator-runtime')
不过这步成功了我又遇到了官方ws域名和这个demo ws域名不符的情况,有点小坑 = =

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

No branches or pull requests

7 participants