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.06.2412050 中是正常的
稳定版在这里下载:https://developers.weixin.qq.com/miniprogram/dev/devtools/stable.html