NervJS / taro

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

Taro v3.5.3 编译微信小程序插件报错 TypeError: Cannot read properties of undefined (reading 'import') #12284

Open yoonzm opened 2 years ago

yoonzm commented 2 years ago

相关平台

微信小程序

复现仓库

https://github.com/yoonzm/taro-plugin 小程序基础库: 2.25.2 使用框架: React

复现步骤

npx taro build --plugin weapp --watch

期望结果

不报错

实际结果

报错

环境信息

👽 Taro v3.5.3

  Taro CLI 3.5.3 environment info:
    System:
      OS: Linux 5.15 Ubuntu 20.04.1 LTS (Focal Fossa)
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.15.1 - /usr/local/bin/node
      Yarn: 1.22.5 - /usr/bin/yarn
      npm: 8.11.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.3 => 3.5.3 
      @tarojs/components: 3.5.3 => 3.5.3 
      @tarojs/helper: 3.5.3 => 3.5.3 
      @tarojs/plugin-framework-react: 3.5.3 => 3.5.3 
      @tarojs/plugin-platform-alipay: 3.5.3 => 3.5.3 
      @tarojs/plugin-platform-jd: 3.5.3 => 3.5.3 
      @tarojs/plugin-platform-qq: 3.5.3 => 3.5.3 
      @tarojs/plugin-platform-swan: 3.5.3 => 3.5.3 
      @tarojs/plugin-platform-tt: 3.5.3 => 3.5.3 
      @tarojs/plugin-platform-weapp: 3.5.3 => 3.5.3 
      @tarojs/react: 3.5.3 => 3.5.3 
      @tarojs/router: 3.5.3 => 3.5.3 
      @tarojs/runtime: 3.5.3 => 3.5.3 
      @tarojs/shared: 3.5.3 => 3.5.3 
      @tarojs/taro: 3.5.3 => 3.5.3 
      @tarojs/taro-h5: 3.5.3 => 3.5.3 
      @tarojs/webpack5-runner: 3.5.3 => 3.5.3 
      babel-preset-taro: 3.5.3 => 3.5.3 
      eslint-config-taro: 3.5.3 => 3.5.3 
      react: ^18.0.0 => 18.2.0 
dingshaohua-com commented 2 years ago

me too, how to resolove