Failed to load SWC binary for linux/x64
See original GitHub issueVerify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Dec 18 16:34:56 UTC 2020 Binaries: Node: 16.15.1 npm: 8.11.0 Yarn: N/A pnpm: 7.4.0 Relevant packages: next: 12.2.1 eslint-config-next: 12.2.0 react: 17.0.2 react-dom: 16.14.0
What browser are you using? (if relevant)
Chrome 102
How are you deploying your application? (if relevant)
next start
Describe the Bug
my project in gitlab-ci(image: node:lts-buster) buid my app.
run next build
i get this error
↓
info - Skipping linting
info - Creating an optimized production build...
info - Downloading WASM swc package...
info - Using experimental wasm build of next-swc
warn - Attempted to load @next/swc-linux-x64-gnu, but it was not installed
warn - Attempted to load @next/swc-linux-x64-gnux32, but it was not installed
warn - Attempted to load @next/swc-linux-x64-musl, but an error occurred: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
Failed to compile.```
how can i fix it
### Expected Behavior
null
### Link to reproduction
null
### To Reproduce
null
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Next failed to load SWC binary - Stack Overflow
When trying to run the command using nextjs npm run dev shows error - failed to load SWC binary see more info here: ......
Read more >failed-loading-swc - Next.js
SWC requires a binary be downloaded that is compatible specific to your system. In some cases this binary may fail to load either...
Read more >How to fix failed to load SWC binary NextJS - Tutorial + Tips
How to fix failed to load SWC binary NextJS ; Remove node_modules directory and package-lock.json; Run npm i to install the dependecncies ;...
Read more >@swc/core-linux-x64-gnu - npm
Start using @swc/core-linux-x64-gnu in your project by running `npm i @swc/core-linux-x64-gnu` ... This is the x86_64-unknown-linux-gnu binary for @swc/core ...
Read more >Getting Started - SWC
Getting Started. Installation. The easiest way to try SWC is using the Playground. Otherwise, run the following to download pre-built binaries:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Downgrade to 12.2.0 works fine.
I had the same problem too, but I was able to take a temporary solution. The version of OpenSSL installed on AmazonLinux 2 is 1.0.2, so I was able to solve the problem by installing OpenSSL 1.1.1. I thought it would work by installing OpenSSL 1.1.1 in the same way in all Linux environments where OpenSSL 1.0.x is installed.
Example of installing OpenSSL 1.1.1 on AmazonLinux 2.