收藏
回答

调用miniprogram-automator里的方法,在mac下报错是什么原因?

export async function startEmulator(bvData ,orderId) {
  return new Promise((resolve, reject) => {
    automator
      .launch({
        cliPath: config.cliPath,
        projectPath: config.projectPath,
        projectConfig: {
          setting: {
            compileHotReLoad: false,
            skylineRenderEnable: false,
          },
        },
      })
      .then(async (miniProgram) => {

        const page = await miniProgram.reLaunch('/pages/index/index')
          })
})
}


一旦调用const page = await miniProgram.reLaunch('/pages/index/index')该方法在ios下就会报错
Cannot read property 'getCurrentPagesByDomain' of undefined


miniprogram-automator:"0.12.1"

微信开发者工具:Nightly 1.06.2503262



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

1 个回答

  • 朝夕
    朝夕
    04-16

    碰到同样的问题。最后发现是微信开发者工具里报的错,因此回滚到最新的稳定版即可。

    截止本回复,在稳定版:1.06.2412050 中是正常的

    稳定版在这里下载:https://developers.weixin.qq.com/miniprogram/dev/devtools/stable.html


    04-16
    有用
    回复 2
    • 朝夕
      朝夕
      04-16
      不要用nightly版本!不要用nightly版本!不要用nightly版本!
      04-16
      回复
    • 朝夕
      朝夕
      星期三 11:06
      现在想来也有可能是选择的 基础库版本较低的原因
      星期三 11:06
      回复
登录 后发表内容