Closed Mo-zixin closed 2 years ago
同样的问题,只在h5下报错,小程序好的
同样的问题,请问如何解决?
同样的问题,怎么解决呀
可以在 app.config 中配置 appId 临时修复
仅在 3.3.18 vue3 for h5 出现该问题,下一个版本修复
可以在 app.config 中配置 appId 临时修复
仅在 3.3.18 vue3 for h5 出现该问题,下一个版本修复
运行yarn dev:h5,浏览器直接报错。 app.config 中配置 appId 也没有用。难道是我配置错了?请问如何配置,可否截个图?浏览器还能识别 appId是否正确吗?有点无奈,刚准备学习taro,demo就跑不起来了。着急
// app.config.ts
export default {
+ appId: 'app',
pages: [
'pages/index/index',
'pages/detail/index'
],
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black'
}
}
感谢解答,在 app.config.ts 中添加了这个属性后可以正常运行了!
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年12月29日(星期三) 中午1:47 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [NervJS/taro] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$forceUpdate') (Issue #10989)
// app.config.ts export default { + appId: 'app', pages: [ 'pages/index/index', 'pages/detail/index' ], window: { backgroundTextStyle: 'light', navigationBarBackgroundColor: '#fff', navigationBarTitleText: 'WeChat', navigationBarTextStyle: 'black' } }
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
相关平台
H5
复现仓库
https://github.com/jdf2e/nutui-demo/tree/master/taro3 浏览器版本: Chrome 96.0.4664.110(正式版本) (64 位) 使用框架: Vue 3
复现步骤
安装依赖后 运行到h5
期望结果
显示页面
实际结果
vue3.ts?d42d:136 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$forceUpdate') at Object.updateAppInstance (vue3.ts?d42d:136) at Object.mount (vue3.ts?d42d:127) at mount (common.ts?d785:127) at Object.onLoad (common.ts?d785:144) at PageHandler.load (index.js?ddae:3022) at _callee$ (index.js?ddae:3298) at tryCatch (runtime.js?96cf:62) at Generator.invoke [as _invoke] (runtime.js?96cf:296) at Generator.prototype. [as next]
环境信息