OOM with emotion plugin?
I was looking at adopting swc with the emotion plugin in one of our repositories when I hit this:
21 Replies
With full backtrace:
SWC config:
The compilation works if we remove the plugin
Compilation also works if I target each folder individually in the sources
Unsure where to go from here for trying to find the cause 🤔
I think you should remove all
.swc
The temp
.swc
folders?Yeap
Ah, I have already, I have, completely removed them with
rm -rf **/.swc
, removed all node modules, wiped to a clean state, installed from npm again, and tried again. Same problem :pensive_cowboy:Selecting the version – SWC
SWC is an extensible Rust-based platform for the next generation of fast developer tools. It's used by tools like Next.js, Parcel, and Deno, as well as companies like Vercel, ByteDance, Tencent, Shopify, and more.
Not sure what you're asking me to do here, I'm using:
-
@swc/cli
0.1.62
- @swc/core
1.3.49
- @swc/plugin-emotion
2.5.59
@swc/core-*
packages are all also at 1.3.49 in the lock
Also, the plugin works for each file and folder independently, but crashes with OOM when doing the project (which is a small project as well, really small)
Just tried:
- completely removing all @swc
packages
- Ensuring there are none remaining in the package lock
- deleting all node_modules
- deleting all .swc
- npm i -D @swc/cli @swc/core @swc/plugin-emotion
Sadly, it still explodesThen please file an issue
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I was able to recreate the issue easily with the mui repo lol I'll file an issue
Does it still happen with the latest version of
@swc/core
?yes
I did a fresh clone of the mui repo and freshly added the swc cli, core, plugin
Ah
then created a basic .swcrc with the plugin, and attempted to compile the
mui-material
packageAre you using M1 mac or arm processor?
yes
M1 mac
GitHub
Plugin fails on arm processor · Issue #7255 · swc-project/swc
Versions: "@swc/plugin-styled-components": "1.5.59", "@swc/core": "1.3.49" Error: Caused by: 0: failed to invoke `/Users/difuks/WebstormProjects/kiosk/src/fr...
well, damn
lol
:sad:
Most of my team are on M1 macs, tragic
Same here
I'm using m1 mac
But well we need a repro anyway
Can you create a repro and left a comment on the issue?
I can try updating wasmer or transitive deps (e.g. cranelift-codegen)
GitHub
[@swc/plugin-emotion] out of bounds memory access · Issue #176 · sw...
This is probably related to swc-project/swc#7255 Caused by: 0: failed to invoke
@swc/plugin-emotion
as js transform plugin at ../../node_modules/@swc/plugin-emotion/swc_plugin_emotion.wasm 1: Run...Added a comment too