NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.36k stars 4.77k forks source link

taro项目升级3.6.8运行h5报错 #14044

Closed qsj919 closed 1 year ago

qsj919 commented 1 year ago

相关平台

微信小程序

复现仓库

https://github.com/qsj919/ec-ticket.git 小程序基础库: 2.32.2 使用框架: React

复现步骤

  1. node版本v14.21.3,运行yarn install
  2. 运行命令yarn dev:test
  3. 可以复现出来错误报告

期望结果

正常运行,不报错

实际结果

报错信息 ERROR in ./src/subpackages/live/images/logo_bg.png ERROR in Cannot read property 'get' of undefined

环境信息

👽 Taro v3.6.8

  Taro CLI 3.6.8 environment info:
    System:
      OS: macOS 13.3.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 14.21.3 - ~/.nvm/versions/node/v14.21.3/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v14.21.3/bin/yarn
      npm: 6.14.18 - ~/.nvm/versions/node/v14.21.3/bin/npm
    npmPackages:
      @tarojs/cli: ^3.6.8 => 3.6.8 
      @tarojs/components: ^3.6.8 => 3.6.8 
      @tarojs/helper: ^3.6.8 => 3.6.8 
      @tarojs/mini-runner: ^3.6.8 => 3.6.8 
      @tarojs/plugin-framework-react: ^3.6.8 => 3.6.8 
      @tarojs/plugin-platform-alipay: ^3.6.8 => 3.6.8 
      @tarojs/plugin-platform-h5: ^3.6.8 => 3.6.8 
      @tarojs/plugin-platform-jd: ^3.6.8 => 3.6.8 
      @tarojs/plugin-platform-qq: ^3.6.8 => 3.6.8 
      @tarojs/plugin-platform-swan: ^3.6.8 => 3.6.8 
      @tarojs/plugin-platform-tt: ^3.6.8 => 3.6.8 
      @tarojs/plugin-platform-weapp: ^3.6.8 => 3.6.8 
      @tarojs/react: ^3.6.8 => 3.6.8 
      @tarojs/rn-runner: ^3.6.8 => 3.6.8 
      @tarojs/router: ^3.6.8 => 3.6.8 
      @tarojs/runtime: ^3.6.8 => 3.6.8 
      @tarojs/shared: ^3.6.8 => 3.6.8 
      @tarojs/taro: ^3.6.8 => 3.6.8 
      @tarojs/taro-h5: ^3.6.8 => 3.6.8 
      @tarojs/webpack-runner: ^3.6.8 => 3.6.8 
      @tarojs/webpack5-runner: ^3.6.8 => 3.6.8 
      babel-preset-taro: ^3.6.8 => 3.6.8 
      eslint-config-taro: ^3.6.8 => 3.6.8 
      react: ^18.0.0 => 18.2.0 
      taro-ui: 3.0.0-alpha.3 => 3.0.0-alpha.3 
ZakaryCode commented 1 year ago

swc 问题,参考这里 https://github.com/NervJS/taro/issues/13373#issuecomment-1449220696

ZakaryCode commented 1 year ago

swc 问题,参考这里 #13373 (comment)

更正一下,issue 中所描述的问题是由于 h5.imageUrlLoaderOption.publicPath 报错导致,自行修复即可,另外项目内包括了一些 autoprefixer 相关的警告亦是如此