Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build编译后有的页面报错,dev模式没有报错,全局cli和项目cli版本一样 #15425

Open
wuqi-y opened this issue Apr 1, 2024 · 1 comment
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@wuqi-y
Copy link

wuqi-y commented Apr 1, 2024

相关平台

微信小程序

小程序基础库: 3.0
使用框架: Vue 3

复现步骤

taro build --type weapp
微信小程序开发者工具打开有的页面就会直接报错。

报错如下
VM260:7961 页面【pages/device/detail/detail]错误:
TypeError: Cannot read property 'call' of undefined
at t (runtime.js? [sm]:1)
at Object.9853 (894f20111bf8f4591ddf4d660752a55e.js:1)
at t (runtime.js? [sm]:1)
at Object.7866 (detail.js:1)
at t (runtime.js? [sm]:1)
at t (detail.js:1)
at detail.js:1
at Function.t.O (runtime.js? [sm]:1)
at detail.js:1
at e (runtime.js? [sm]:1)(env: Windows,mp,1.06.2308310; lib: 3.0.0)
(anonymous) @ VM260:7961
doWhenAllScriptLoaded @ VM242:8084
scriptLoaded @ VM242:8106
(anonymous) @ VM242:8131
Promise.then (async)
(anonymous) @ VM242:8152
(anonymous) @ VM242:8156
(anonymous) @ VM241:8165
Promise.then (async)
(anonymous) @ VM241:2
(anonymous) @ VM241:8168
TypeError: Cannot read property 'call' of undefined
at t (runtime.js? [sm]:1)
at Object.9853 (894f20111bf8f4591ddf4d660752a55e.js:1)
at t (runtime.js? [sm]:1)
at Object.7866 (detail.js:1)
at t (runtime.js? [sm]:1)
at t (detail.js:1)
at detail.js:1
at Function.t.O (runtime.js? [sm]:1)
at detail.js:1
at e (runtime.js? [sm]:1)(env: Windows,mp,1.06.2308310; lib: 3.0.0)

期望结果

build后正常使用

实际结果

build后页面报错

环境信息

D:\taro-app\front>taro info
👽 Taro v3.6.11


  Taro CLI 3.6.11 environment info:
    System:
      OS: Windows 10 10.0.16299
    Binaries:
      Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
      npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: ^3.6.11 => 3.6.11
      @tarojs/components: 3.6.11 => 3.6.11
      @tarojs/helper: 3.6.11 => 3.6.11
      @tarojs/plugin-framework-react: ^3.6.11 => 3.6.11
      @tarojs/plugin-framework-vue3: 3.6.11 => 3.6.11
      @tarojs/plugin-platform-alipay: 3.6.11 => 3.6.11
      @tarojs/plugin-platform-h5: 3.6.11 => 3.6.11
      @tarojs/plugin-platform-jd: 3.6.11 => 3.6.11
      @tarojs/plugin-platform-qq: 3.6.11 => 3.6.11
      @tarojs/plugin-platform-swan: 3.6.11 => 3.6.11
      @tarojs/plugin-platform-tt: 3.6.11 => 3.6.11
      @tarojs/plugin-platform-weapp: 3.6.11 => 3.6.11
      @tarojs/runtime: 3.6.11 => 3.6.11
      @tarojs/shared: 3.6.11 => 3.6.11
      @tarojs/taro: 3.6.11 => 3.6.11
      @tarojs/taro-loader: 3.6.11 => 3.6.11
      @tarojs/webpack5-runner: 3.6.11 => 3.6.11
      babel-preset-taro: 3.6.11 => 3.6.11
      eslint-config-taro: 3.6.11 => 3.6.11
      taro-ui: ^2.3.4 => 2.3.4
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 1, 2024
@wuqi-y
Copy link
Author

wuqi-y commented Apr 1, 2024

dev模式下是正常的,build就会报错

This was referenced Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
Status: Todo
Development

No branches or pull requests

1 participant