Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think one of the biggest issues with node-sass was that it only supported a narrow set of node versions and platforms, which resulted in a lot more compilation from source. I definitely remember fighting with node-gyp and such, and pretty quickly ditched it for dart sass as soon as that was a viable alternative.

Next.js looks like it's shipping binaries for swc for a wide Node range (>=10), on a pretty comprehensive combination of operating systems and architectures:

- android-arm64

- darwin-arm64

- darwin-x64

- linux-arm-gnueabihf

- linux-arm64-gnu

- linux-arm64-musl

- linux-x64-gnu

- linux-x64-musl

- win32-arm64-msvc

- win32-ia32-msvc

- win32-x64-msvc

Unfortunately I don't have access to a system that _doesn't_ have a pre-built binary, so I have no idea what would happen if you tried to install Next.js on an unsupported architecture. That being said, I'd love to see the Next.js team ship a WASM version of SWC for such systems, which should ensure that when there's not a pre-built binary, at least you won't be asked to install a Rust compiler.



I actually upgraded my team's Jest config to use https://github.com/Brooooooklyn/swc-node a few weeks ago. However, our Jenkins CI agents run RHEL7, and neither of the Linux binary targets would run. The `x64-gnu` binary needed a `GLIBC_2_23` symbol when only 2.18 was available, and the `x64-musl` binary had no `musl-libc` on the machine. I don't own the Jenkins agents, so I couldn't install other deps myself.

I ended up building `musl-libc` from source on another RHEL7 agent, committed the `.so` to our repo, and added that to the `LD_LIBRARY_PATH` in our Jenkinsfile, and actually got that working.

I did see some mentions that Rust could build to target an older GLibc ( https://kobzol.github.io/rust/ci/2021/05/07/building-rust-bi... ), so I'm curious if Next is going to use copies of SWC built that way for better compat or if it will require more workarounds on my part.

I can definitely see shipping a WASM version as a great workaround to those sorts of compat issues.


`objdump -T node_modules/@next/swc-linux-x64-gnu/next-swc.linux-x64-gnu.node | grep GLIBC_`

Looks like the highest version of `GLIBC` is 2.18, so I think you'll be fine!


Great, thanks for the info!

Already added a story to investigate the upgrade from Next 11 to 12.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: