next.js: "@next/swc-android-arm64 not accessible from next" when running npm ci in Github Action

What version of Next.js are you using?

12.0.2

What version of Node.js are you using?

14.17.1

What browser are you using?

Chrome

What operating system are you using?

Windows

How are you deploying your application?

Vercel

Describe the Bug

We’re using a Github Action to install all depencies using npm ci and deploy to Chromatic. However, this Action is failing at the moment with the following error: npm ERR! @next/swc-android-arm64 not accessible from next Running npm ci on my local machine seems to work fine. I already tried to delete the package-lock.json and recreating it but the problem still persists. We’re using npm@8.1.2 maybe it’s related to that, it appears to work fine with npm@6

Expected Behavior

npm ci installs all dependencies without any issues

To Reproduce

  • Create a Next Project with next@11 or next@12
  • Use npm@8 on your local machine
  • Run npm ci using Github Action

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

For those getting this error in their GitHub Action pipeline or other CI pipelines, make sure that your local version of npm matches the version used in by your workflow runner.

For me, I have to run the command npm i -g npm@latest in my GitHub Action .yml file to use version 8 of npm. You get this error @next/swc-android-arm64 not accessible from next if you are not running version 8 of npm.

Updating from 12.0.2 to 12.0.3 fixed the issue for me. 👍

@timneutkens I had the exact same issue (and deploying on Vercel failed as well), but it’s working as expected with next@canary.

Had the same issue in our docker build. 12.0.4-canary.9 fixed it 👍

Can you try using npm install next@canary and report back if that fixes the issue?

For those getting this error in their GitHub Action pipeline or other CI pipelines, make sure that your local version of npm matches the version used in by your workflow runner.

For me, I have to run the command npm i -g npm@latest in my GitHub Action .yml file to use version 8 of npm. You get this error @next/swc-android-arm64 not accessible from next if you are not running version 8 of npm.

In our case, our pipelines used npm v6 so we had to install that locally & regenerate our package-lock.json using npm v6. Hope that helps out someone else who comes across this issue.

In some cases the issue happens when the version of node not is the 16-alpine at least. Happened to me in cicd, is enought with change this line:

FROM node:14-alpine to FROM node:16-alpine wich install npm v8.

Upgraded to 12.0.4 today and now get this exact issue. Lockfile generated under npm v8