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

从taro2升级到taro3后,在组件中Taro.getApp() 返回undefined #8338

Closed
yclnycl opened this issue Dec 21, 2020 · 1 comment
Closed

从taro2升级到taro3后,在组件中Taro.getApp() 返回undefined #8338

yclnycl opened this issue Dec 21, 2020 · 1 comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@yclnycl
Copy link

yclnycl commented Dec 21, 2020

相关平台

微信小程序

小程序基础库: 2.11.0
使用框架: React

复现步骤

因为是版本升级导致的,我不清楚如何搞一个复现仓库
npm run dev:weapp

期望结果

希望返回和taro2一样的结果

实际结果

undefined

环境信息

👽 Taro v3.0.21


  Taro CLI 3.0.21 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - C:\Program Files\nodejs\yarn.CMD
      npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Dec 21, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Dec 29, 2020

确认一下 CLI 和依赖是否一致,是否按升级指南操作。Taro.getApp 只是直接调用 getApp,如果还有问题,可以断点进去看看

@Chen-jj Chen-jj closed this as completed Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants