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

SWC-loader not working on Apple M3 #49

Closed
George-Sava opened this issue Jul 24, 2024 · 3 comments
Closed

SWC-loader not working on Apple M3 #49

George-Sava opened this issue Jul 24, 2024 · 3 comments

Comments

@George-Sava
Copy link

I've switched recently on a new Macbook with Apple M3 and I'm trying to start my React application that previously was working on my Macbook with Intel, but I get this error:

Module build failed (from ../node_modules/swc-loader/src/index.js):
Error: failed to handle: failed to invoke plugin: failed to invoke plugin on 'Some("path/to/main/file")'

Caused by:
    0: Failed to create plugin instance
    1: missing requires CPU features: "EnumSet(SSE2 | SSE3 | SSSE3 | SSE41 | SSE42 | POPCNT | AVX | BMI1 | BMI2 | AVX2 | LZCNT)"
    at Compiler.transformSync (.../node_modules/@swc/core/index.js:241:29)
    at Object.transformSync (.../node_modules/@swc/core/index.js:348:21)
    at Object.<anonymous> (.../node_modules/swc-loader/src/index.js:79:36)

What I've tried

  1. Assured that I'm using the corect ARM version of my editor.
  2. Started my terminal under Rosetta.
  3. Uninstalled and reinstalled my workspace node_modules
  4. Uninstalled and reinstalled my global node_modules

None of the above resolved my issue.

Version Used
"swc-loader": "0.2.3"

@kdy1
Copy link
Member

kdy1 commented Jul 25, 2024

Actually I'm using M3 macbook, so I'm not sure how can this happen

@kdy1
Copy link
Member

kdy1 commented Jul 25, 2024

I think Started my terminal under Rosetta. can be the cause. You should use native arm binary.

@George-Sava
Copy link
Author

Yeah, I managed to resolve it. I just updated my swc-loader and swc-core to the latest version. This lixed the issue.

kdy1 added a commit that referenced this issue Oct 22, 2024
kdy1 added a commit that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants