Search code examples
next.jsbabeljsswc-compiler

Next failed to load SWC binary


When trying to run the command using nextjs npm run dev shows error - failed to load SWC binary see more info here: https://nextjs.org/docs/messages/failed-loading-swc.

I've tried uninstalling node and reinstalling it again with version 16.13 but without success, on the vercel page, but unsuccessful so far. Any tips?

Also, I noticed it's a current issue on NextJS discussion page and it has to do with the new Rust-base compiler which is faster than Babel.


Solution

  • Delete the package-lock.json file and the node_modules directory in your project and then run npm install on your terminal.

    If you still have issues, you may refer the following link.

    Nextjs Docs: https://nextjs.org/docs/messages/failed-loading-swc