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.

SWC Linux packages not installed in Alpine 3.14 arm64 environment

See original GitHub issue

What version of Next.js are you using?

12.0.0

What version of Node.js are you using?

v16.11.1

What browser are you using?

n/a

What operating system are you using?

Alpine 3.14 (arm64)

How are you deploying your application?

n/a

Describe the Bug

After installing next@12.0.0 I got the “SWC failed to load” error described in https://nextjs.org/docs/messages/failed-loading-swc. I’m running Node v16.11.1 on Alpine 3.14 (on top of Docker for Desktop, Apple M1).

It seems that some of the @next/swc-linux-* packages are marked incorrectly as Darwin packages. As a result none of the @next/swc-* packages was downloaded.

For example package-lock.json has the following entry:

    "node_modules/@next/swc-linux-x64-musl": {
      "version": "12.0.0",
      "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.0.0.tgz",
      "integrity": "sha512-0pizk3CZasxbaSyn7FzXb9cfrgIjmyq0dA3+MqvFZJNTLjDw8/yk0w3HdAOPFor3Tgoqhu5nsX/X5mnE6tObng==",
      "cpu": [
        "arm64"
      ],
      "optional": true,
      "os": [
        "darwin"
      ],
      "engines": {
        "node": ">= 10"
      }
    },

Expected Behavior

The expected behavior is to find @next/swc-linux-x64-musl installed in my node_modules folder.

To Reproduce

Install and run next@12.0.0 inside the node:16.11.1-alpine3.14 Docker image in an arm64 environment.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
dontsavecommented, Nov 3, 2021

@ijjk this appears to have broken again in 12.0.2

4reactions
ijjkcommented, Oct 27, 2021

Hi, we updated the SWC packages in the latest version of Next.js v12.0.1, please update and give it a try!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alpine Linux:FAQ
It means that the package you try to install does not exist in the repositories you have configured. Maybe you forgot to add...
Read more >
Installation - Alpine Linux Wiki
Installation Overview. The general course of action. Note: For single-board-computer (SBC) architectures which can not boot .
Read more >
Upgrading Alpine - Alpine Linux Wiki
Upgrading an Alpine Linux Hard-disk installation. Upgrading from older versions. In case an older version needs to be upgraded, i.e. not ...
Read more >
Alpine Linux in a chroot
1 Requirements; 2 Prerequisites; 3 Set up APK; 4 Install the ... the chroot environment, you can build, debug, and run Alpine packages...
Read more >
Choosing the Right Installation Medium
Booting. Once you have prepared your appropriate installation medium, you need to boot into the Alpine Linux live environment. During the bootup of...
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