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

RN ios. 启动报错 1: missing requires CPU features: "EnumSet(SSE2)" #13373

Closed
BestKai opened this issue Feb 27, 2023 · 13 comments
Closed

RN ios. 启动报错 1: missing requires CPU features: "EnumSet(SSE2)" #13373

BestKai opened this issue Feb 27, 2023 · 13 comments
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x

Comments

@BestKai
Copy link

BestKai commented Feb 27, 2023

相关平台

React Native

使用框架: React

复现步骤

期望结果

可以正常运行

实际结果

无法运行
ransform[stderr]: thread '' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/yunkai/Desktop/Project/loanCalculator/src/app.config.ts")'
transform[stderr]:
transform[stderr]: Caused by:
transform[stderr]: 0: Failed to create plugin instance
transform[stderr]: 1: missing requires CPU features: "EnumSet(SSE2)"
transform[stderr]: ', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.245.32/src/plugin.rs:228:14
transform[stderr]: note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
BUNDLE ./index

error: index.js: failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("/Users/yunkai/Desktop/Project/loanCalculator/src/app.config.ts")'

环境信息

👽 Taro v3.6.2


  Taro CLI 3.6.2 environment info:
    System:
      OS: macOS 13.2.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.14.2 - /usr/local/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 9.5.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.2 => 3.6.2
      @tarojs/components: 3.6.2 => 3.6.2
      @tarojs/helper: 3.6.2 => 3.6.2
      @tarojs/plugin-framework-react: 3.6.2 => 3.6.2
      @tarojs/plugin-platform-alipay: 3.6.2 => 3.6.2
      @tarojs/plugin-platform-h5: 3.6.2 => 3.6.2
      @tarojs/plugin-platform-jd: 3.6.2 => 3.6.2
      @tarojs/plugin-platform-qq: 3.6.2 => 3.6.2
      @tarojs/plugin-platform-swan: 3.6.2 => 3.6.2
      @tarojs/plugin-platform-tt: 3.6.2 => 3.6.2
      @tarojs/plugin-platform-weapp: 3.6.2 => 3.6.2
      @tarojs/react: 3.6.2 => 3.6.2
      @tarojs/rn-runner: 3.6.2 => 3.6.2
      @tarojs/rn-supporter: 3.6.2 => 3.6.2
      @tarojs/runtime: 3.6.2 => 3.6.2
      @tarojs/runtime-rn: 3.6.2 => 3.6.2
      @tarojs/shared: 3.6.2 => 3.6.2
      @tarojs/taro: 3.6.2 => 3.6.2
      @tarojs/taro-rn: 3.6.2 => 3.6.2
      @tarojs/webpack5-runner: 3.6.2 => 3.6.2
      babel-preset-taro: 3.6.2 => 3.6.2
      eslint-config-taro: 3.6.2 => 3.6.2
      expo: ~47.0.3 => 47.0.13
      react: ^18.1.0 => 18.2.0
      react-native: ^0.70.1 => 0.70.7
      taro-ui: ^3.1.0-beta.4 => 3.1.0-beta.4
@taro-bot2 taro-bot2 bot added F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x labels Feb 27, 2023
@sichenguo
Copy link

我也遇到了这个问题,有解吗

@zhiqingchen
Copy link
Member

  1. xcode 和 系统,先升到最新。
  2. 参考正常流程 https://github.com/zhiqingchen/taro-test/actions/runs/4161455310

@icepy
Copy link

icepy commented Feb 28, 2023

  1. xcode 和 系统,先升到最新。
  2. 参考正常流程 https://github.com/zhiqingchen/taro-test/actions/runs/4161455310

安装了最新的系统和 xcode ,依然是这个报错,有解吗?

@zhiqingchen
Copy link
Member

都是3.6.2才出现的吗?
试试3.6.1

@zhiqingchen
Copy link
Member

提供下可复现demo

@BestKai
Copy link
Author

BestKai commented Feb 28, 2023

我用3.6.2新建一个工程测试是可以的,然后把原来的代码拷贝到新建的工程里解决了。我的m系列的mac 有问题,intel 的没什么问题。

@icepy
Copy link

icepy commented Feb 28, 2023

提供下可复现demo

找到问题了,因为 .swc 目录

@BestKai
Copy link
Author

BestKai commented Mar 1, 2023

提供下可复现demo

找到问题了,因为 .swc 目录

具体怎么解决的呢?

@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 1, 2023

删除 .swc,然后 gitignore 掉试试。如果提交到仓库,别人的 .swc 会导致本机报错

@pengfeiu
Copy link

删除 .swc,然后 gitignore 掉试试。如果提交到仓库,别人的 .swc 会导致本机报错

NB,谢谢大哥,解决我的问题了

@yoyo837
Copy link
Contributor

yoyo837 commented May 10, 2023

Taro或者swc那边是不是应该在创建.swc文件夹时子包含一个.gitignore, 里面写* ? Taro做不到的话, 就给 swc提PR.

没做, 可能是考虑到有可能部分场景, 用户不希望ignore.

@osilkin98
Copy link

在将数据从一台Intel Mac迁移到一台M1芯片的Mac后,我遇到了这个问题。由于所有生成的缓存文件都基于x86架构,清理存储库并删除我的.next文件夹解决了这个问题。

@hhhero
Copy link

hhhero commented Oct 13, 2023

删除 .swc,然后 gitignore 掉试试。如果提交到仓库,别人的 .swc 会导致本机报错

亲测有用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

9 participants