Thanks to visit codestin.com
Credit goes to github.com

Skip to content

next/jest 12.3.6 Failed to load SWC binary for darwin/x64 #77569

@JayCarney

Description

@JayCarney

Link to the code that reproduces this issue

https://github.com/JayCarney/minimal-nextjs-12.3.6-issue

To Reproduce

  1. Install dependencies
  2. run jest tests npm run test:ci
  3. Error: Failed to load SWC binary for darwin/x64

Current vs. Expected behavior

Current

Versions of next.js <= 12.3.4 will run the jest test suite, but 12.3.6 errors with Failed to load SWC binary for darwin/x64 even with .babelrc and swcMinify disabled as documented here

Image

Expected

npm run test:ci should execute the jest test suite

Provide environment information

Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.6.0: Thu Dec  5 23:45:11 PST 2024; root:xnu-8796.141.3.709.7~4/RELEASE_X86_64
    Binaries:
      Node: 18.20.8
      npm: 10.8.2
      Yarn: 1.22.17
      pnpm: N/A
    Relevant packages:
      next: 12.3.6
      eslint-config-next: N/A
      react: 18.3.1
      react-dom: 18.3.1

Which area(s) are affected? (Select all that apply)

Testing

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

Weird edge case

I found while trying to pin down a version this breaks; If you change to next 12.3.4 in package.json and do an install, tests will run correctly. Then swapping back to 12.3.6 will also now work even after blowing away node_modules and package-lock.json or yarn.lock.

I've tried this with node versions v18.20.8 and v22.14.0 and they both complain about Failed to load SWC binary for darwin/x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    TestingRelated to testing with Next.js.locked

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions