question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to load SWC binary for linux/x64

See original GitHub issue

Verify 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:closed
  • Created a year ago
  • Reactions:6
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
pchocommented, Jul 9, 2022

Downgrade to 12.2.0 works fine.

6reactions
poadcommented, Jul 10, 2022

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.

yum remove openssl-devel -y
yum install openssl11 openssl11-devel -y
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found