taro icon indicating copy to clipboard operation
taro copied to clipboard

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

Open brainee opened this issue 1 year ago • 2 comments

相关平台

微信小程序

复现仓库

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 

brainee avatar Apr 17 '24 04:04 brainee

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

brainee avatar Apr 17 '24 04:04 brainee

image

image

brainee avatar Apr 17 '24 10:04 brainee