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

3.6.24开始一直到最新的3.6.26我的库一直编译失败,看报错像是jsx不支持了? #15515

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

Comments

@zhipenglin
Copy link

相关平台

微信小程序

复现仓库

https://github.com/kne-union/antd-taro.git
小程序基础库: 2.24.6
使用框架: React

复现步骤

目前项目代码是没有问题的,但是将package.json中有关taro的包版本改到3.6.24及其以上时就会报错

✖ Errors: 

ModuleParseError: Module parse failed: Unexpected token (3304:6)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| const BaseExample = ()=>{
|     return (
>       <Space direction={'vertical'} size={30}>
|         <Space direction={'vertical'}>
|           <View>基础用法</View>

→ Watching... [2024/4/16 10:16:11]

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "
[object Array]".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v18.18.2
ERROR: "start:example" exited with 1.

项目启动方法: npm run init && npm run start

期望结果

编译通过

实际结果

编译报错

环境信息

👽 Taro v3.6.26


  Taro CLI 3.6.26 environment info:
    System:                                                                                         
      OS: Windows 10 10.0.19044
    Binaries:
      Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: ^3.6.26 => 3.6.26
      @tarojs/helper: file:../node_modules/@tarojs/helper => 3.6.26
      @tarojs/mini-runner: ^3.6.26 => 3.6.26
      @tarojs/plugin-framework-react: file:../node_modules/@tarojs/plugin-framework-react => 3.6.26 
      @tarojs/plugin-platform-weapp: file:../node_modules/@tarojs/plugin-platform-weapp => 3.6.26   
      @tarojs/react: file:../node_modules/@tarojs/react => 3.6.26
      @tarojs/runtime: file:../node_modules/@tarojs/runtime => 3.6.26
      @tarojs/shared: file:../node_modules/@tarojs/shared => 3.6.26
      @tarojs/taro: file:../node_modules/@tarojs/taro => 3.6.26
      @tarojs/taro-loader: ^3.6.26 => 3.6.26
      @tarojs/webpack5-runner: ^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: file:../node_modules/react => 18.2.0

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 16, 2024
This was referenced Apr 20, 2024
@hcw2175
Copy link

hcw2175 commented Apr 22, 2024

+1

image

从 3.6.27 降回 3.6.22,恢复正常。

@levidcd
Copy link

levidcd commented May 6, 2024

+1, 现在锁定3.6.24了

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

3 participants