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

TypeError: Cannot read property 'Component' of undefined #16209

Open
TuringZhu opened this issue Jul 30, 2024 · 4 comments
Open

TypeError: Cannot read property 'Component' of undefined #16209

TuringZhu opened this issue Jul 30, 2024 · 4 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-4 Version - 4.x

Comments

@TuringZhu
Copy link

相关平台

微信小程序

复现仓库

https://gitlab.com/Turing7/mini_app_tmpl_taro_react.git
小程序基础库: 3.5.2
使用框架: React

复现步骤

在windows上执行 taro init PROJECT_NAME ,选择 react,npm,sass,github,taro-ui 参数.
然后编译并在微信开发者工具中预览

期望结果

出现Hello World等示例代码

实际结果

微信开发者工具中标题为首页,页面空白, 控制台报错

环境信息

PS D:\src\mini_app_taro_react> .\node_modules\.bin\taro.cmd info
👽 Taro v4.0.4

(node:28312) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

  Taro CLI 4.0.4 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 22.5.1 - D:\applications\node\node.EXE
      npm: 10.8.2 - D:\applications\node\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.4 => 4.0.4
      @tarojs/components: 4.0.4 => 4.0.4
      @tarojs/helper: 4.0.4 => 4.0.4
      @tarojs/plugin-framework-react: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-alipay: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-h5: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-jd: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-qq: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-swan: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-tt: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-weapp: 4.0.4 => 4.0.4
      @tarojs/react: 4.0.4 => 4.0.4
      @tarojs/runtime: 4.0.4 => 4.0.4
      @tarojs/shared: 4.0.4 => 4.0.4
      @tarojs/taro: 4.0.4 => 4.0.4
      @tarojs/vite-runner: 4.0.4 => 4.0.4
      babel-preset-taro: 4.0.4 => 4.0.4
      eslint-config-taro: 4.0.4 => 4.0.4
      react: ^18.0.0 => 18.3.1
      taro-ui: ^3.2.1 => 3.3.0

PS D:\src\mini_app_taro_react>

补充信息

"name": "taro-ui",
"typescript": true,
"css": "Sass",
"framework": "React"
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 30, 2024
@TheKonka TheKonka added V-4 Version - 4.x and removed V-3 Version - 3.x labels Jul 30, 2024
This was referenced Aug 3, 2024
@narutohinata
Copy link

我也遇到了

@yetnelson
Copy link

请问解决了吗?

@renlindong
Copy link

这项目死了吗

@h7ml
Copy link

h7ml commented Oct 28, 2024

+1

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-4 Version - 4.x
Projects
Status: Todo
Development

No branches or pull requests

6 participants