ReferenceError: define is not defined
发布于 6 年前 作者 fangpeng 5139 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

[publib]:834 ReferenceError: define is not defined

    at weapp:///pages/coupons/index.js:1

    at ContextifyScript.Script.runInContext (vm.js:59)

    at Object.runInContext (vm.js:120)

    at loadCode ([publib]:828)

    at handleInitUserCode ([publib]:812)

    at handleSetupContext ([publib]:1225)

    at handleProcessMessage ([publib]:1234)

    at WebSocket.ws.on ([publib]:1462)

    at emitOne (events.js:115)

    at WebSocket.emit (events.js:210)

在真机调试始终报错;预览和上传体验版 就可以正常使用

2 回复

你好,麻烦下载更新最新的Nightly Build版本https://developers.weixin.qq.com/miniprogram/dev/devtools/nightly.html或者
RC Build 版本https://developers.weixin.qq.com/miniprogram/dev/devtools/rc.html,define is not defined的问题已在这两个版本解决

升级开发者工具

回到顶部