Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

657
Views
Why getStaticProps giving error of "Failed to load SWC binary for win32/x64"?

I am using getStaticProps() in a Next.js app but when I run the app it gives ERROR:-

warn  - Attempted to load @next/swc-win32-x64-gnu, but it was not installed
warn  - Attempted to load @next/swc-win32-x64-msvc, but an error occurred: The specified 
module could not be found.
\\?\D:\tasks\next-js\node_modules\@next\swc-win32-x64-msvc\next-swc.win32-x64-msvc.node
error - Failed to load SWC binary for win32/x64, see more info here: 
https://nextjs.org/docs/messages/failed-loading-swc
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! next-js@0.1.0 dev: `next dev`
npm ERR! Exit status 1
npm ERR!

I tried all methods like uninstalling node_module, package-lock and reinstalling it. I tried adding .babelrc file, also added swcMinify: false in next.config but nothing works.
When I use useEffect instead of getStaticProps then it works fine. Here is the getStaticProps function:-

export const getStaticProps = async () =>{

const res = await fetch('https://jsonplaceholder.typicode.com/posts');
const data = await res.json();

return{
    props: {
        data,
    }
  };
};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This issue appears when running next@12.1.6 and happens even if your .babelrc file and next.config.js files are configured to not load swc.

If you downgrade to next@12.1.0, the swc binary load error should go away.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!