jdf2e / nutui

京东风格的移动端 Vue 组件库,支持多端小程序(A Vue.js UI Toolkit for Mobile Web)
https://nutui.jd.com
MIT License
6.09k stars 826 forks source link

创建新的taro 微信小程序项目,真机调试: TypeError: Cannot read property 'setPageTypeById' of undefined #3147

Open panguoxian opened 1 month ago

panguoxian commented 1 month ago

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

4.3.11

平台

weapp

重现链接

参考快速上手里面操作

重现步骤

1、taro init myApp 生成项目

2、pnpm dev:weapp 编译出 diSt

3、微信开发者工具 导入项目

4、真机调试 出现 index.js:1 eval script evaluate_id #5 failed TypeError: Cannot read property 'setPageTypeById' of undefined 错误 但是小程序能正常运行。担心有隱患。 ![Uploading 50.jpg…]()

期望的结果是什么?

不报错

实际的结果是什么?

希望知道这是什么原因有什么办法可以解决?

环境信息

taro info 👽 Taro v3.6.34

Taro CLI 3.6.34 environment info: System: OS: Windows 10 10.0.19045 Binaries: Node: 20.15.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD npmPackages: @tarojs/cli: 3.6.34 => 3.6.34 @tarojs/components: 3.6.34 => 3.6.34 @tarojs/helper: 3.6.34 => 3.6.34 @tarojs/plugin-framework-vue3: 3.6.34 => 3.6.34 @tarojs/plugin-html: 3.6.34 => 3.6.34 @tarojs/plugin-platform-alipay: 3.6.34 => 3.6.34 @tarojs/plugin-platform-h5: 3.6.34 => 3.6.34 @tarojs/plugin-platform-jd: 3.6.34 => 3.6.34 @tarojs/plugin-platform-qq: 3.6.34 => 3.6.34 @tarojs/plugin-platform-swan: 3.6.34 => 3.6.34 @tarojs/plugin-platform-tt: 3.6.34 => 3.6.34 @tarojs/plugin-platform-weapp: 3.6.34 => 3.6.34 @tarojs/runtime: 3.6.34 => 3.6.34 @tarojs/shared: 3.6.34 => 3.6.34 @tarojs/taro: 3.6.34 => 3.6.34 @tarojs/taro-loader: 3.6.34 => 3.6.34 @tarojs/webpack5-runner: 3.6.34 => 3.6.34 babel-preset-taro: 3.6.34 => 3.6.34 eslint-config-taro: 3.6.34 => 3.6.34

其他补充信息

是否是我的环境有问题?

jiayoujyjyjy commented 1 month ago

同样问题,蹲一个后续

xshwy commented 1 month ago

我也遇到同样的问题了,MAC真机测试没问题;MAC开发测试也没问题;到真机就出这个问题,iOS和Android都一样。

image
xshwy commented 1 month ago

在真机测试的时候,还提示缺少NoticeBar,开发版、MAC真机测试、体验版都没问题…