jd-opensource / jd-opensource/nutui

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

Open
#3,147 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
6.5k
Forks
835
PR merge metrics
No merged PRs in 30d

Description

### NutUI 包名

@nutui/nutui-taro

### NutUI 版本号

4.3.11

### 平台

weapp

### 重现链接

[参考快速上手里面操作](https://nutui.jd.com/taro/vue/4x/#/zh-CN/guide/start)

### 重现步骤

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

### 其他补充信息

是否是我的环境有问题?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.