3

While updating dependencies, I'm getting the following error:

npm ERR! esbuild-android-64 not accessible from esbuild

I cannot find any reference to it, apart from a single issue on ESBuild that is apparently resolved by updating to Node 16, which I am already on.

I can't find what the error is trying to convey, let alone how to fix it. Has anyone ever seen a "not accessible from" error on NPM?

I'm not getting it on Mac, but our CI server is Windows and seems to encounter it regularly.

Dan Bowling
  • 1,205
  • 1
  • 15
  • 41

2 Answers2

7

Changing the Node version on AWS to match the Node version I was using on my local machine helped me to overcome this issue.

AWS was using Node v14. The issue went away when I specified Node v16.

Checkout this thread if you're deploying on AWS: How To Change Node Version AWS

1

As an alternative to changing the node version, you can also mark the dependency as optional, as described in this bug report:

Run: npm i esbuild-android-64 --save-optional

This will result in the following in your package.json:

"optionalDependencies": {
    "esbuild-android-64": "^0.15.18",
}

Marking the specific package as optional tells npm it can safely ignore the install fail and continue with the other dependencies.

brasskazoo
  • 76,030
  • 23
  • 64
  • 76