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

小程序官方Demo转换成Taro代码,运行h5报错 #15524

Open
brainee opened this issue Apr 17, 2024 · 2 comments
Open

小程序官方Demo转换成Taro代码,运行h5报错 #15524

brainee opened this issue Apr 17, 2024 · 2 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@brainee
Copy link

brainee commented Apr 17, 2024

相关平台

微信小程序

复现仓库

https://github.com/brainee/weixin-pages-convert.git
小程序基础库: 8.0.36
使用框架: React

复现步骤

cd .. && npx tsc npx @tarojs/cli-convertor

cd taroConvert && npm run dev:h5

期望结果

h5页面正常运行

实际结果

home.js:164 Uncaught ReferenceError: Tsearch is not defined
at BaseComponent2.render (home.js:164:1)
at finishClassComponent (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:14875:53)
at updateClassComponent (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:14840:42)
at beginWork (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:16084:40)
at HTMLUnknownElement.callCallback2 (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:3812:38)
at Object.invokeGuardedCallbackDev (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:3836:38)
at invokeGuardedCallback (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:3870:49)
at beginWork$1 (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:19978:29)
at performUnitOfWork (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:19407:32)
at workLoopSync (vendors-node_modules_taro_h5_prebundle_chunk-4IQZHIGR_js.chunkhash.js:19346:25)

环境信息

👽 Taro v3.6.26


  Taro CLI 3.6.26 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.14.0 - /opt/homebrew/Cellar/nvm/0.39.3/versions/node/v16.14.0/bin/node
      npm: 8.3.1 - /opt/homebrew/Cellar/nvm/0.39.3/versions/node/v16.14.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.26 => 3.6.26 
      @tarojs/components: 3.6.26 => 3.6.26 
      @tarojs/helper: 3.6.26 => 3.6.26 
      @tarojs/plugin-framework-react: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-alipay: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-h5: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-jd: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-qq: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-swan: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-tt: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-weapp: 3.6.26 => 3.6.26 
      @tarojs/react: 3.6.26 => 3.6.26 
      @tarojs/runtime: 3.6.26 => 3.6.26 
      @tarojs/shared: 3.6.26 => 3.6.26 
      @tarojs/taro: 3.6.26 => 3.6.26 
      @tarojs/taro-loader: 3.6.26 => 3.6.26 
      @tarojs/webpack5-runner: 3.6.26 => 3.6.26 
      @tarojs/with-weapp: ^3.6.26 => 3.6.26 
      babel-preset-taro: 3.6.26 => 3.6.26 
      eslint-config-taro: 3.6.26 => 3.6.26 
      react: ^18.0.0 => 18.2.0 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 17, 2024
@brainee
Copy link
Author

brainee commented Apr 17, 2024

Call Stack
 rejectionHandler
  node_modules/@pmmmwh/react-refresh-webpack-plugin/client/utils/errorEventHandlers.js:46:21

@brainee
Copy link
Author

brainee commented Apr 17, 2024

image

image

This was referenced Apr 20, 2024
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
Status: Todo
Development

No branches or pull requests

1 participant