firebase-tools: Installing v11.12.0 fails with EBADPLATFORM on linux container
Runing npm install -g firebase-tools@11
on circle ci gets an error
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for esbuild-android-64@0.15.8: wanted {"os":"android","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS: android
npm ERR! notsup Valid Arch: x64
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
Also reproducible on Docker with node:14
image
docker run --rm -ti node:14 npm install -g firebase-tools@11
[REQUIRED] Environment info
firebase-tools: v11.12.0
Platform: Docker node:14, Debian based
[REQUIRED] Test case
Run a node14 container and try to install firebase tool
docker run --rm -ti node:14 npm install -g firebase-tools@11
[REQUIRED] Steps to reproduce
docker run --rm -ti node:14 npm install -g firebase-tools@11
[REQUIRED] Expected behavior
Install the linux version of firebase-tool successfully
[REQUIRED] Actual behavior
Throws error stating I should be on android OS
❯ docker run --rm -ti node:14 npm install -g firebase-tools@11
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for esbuild-android-64@0.15.8: wanted {"os":"android","arch":"x64"} (current: {"os":"linux","arch":"arm64"})
npm ERR! notsup Valid OS: android
npm ERR! notsup Valid Arch: x64
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: arm64
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-09-29T18_39_46_531Z-debug.log
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 16
- Comments: 21 (8 by maintainers)
I experienced this same issue. Went with the upgrade to
node:16
solution 👍Alright, this should be addressed in
v11.13.0
. Please let me know if it persists.We think we have a solution to move the troublesome dependency around. We’re doing some verification on the idea, but if it works out we’ll try to get a new release out tomorrow (Friday).
Here’s an interesting thought: it only happens with
npm@6
. I installednpm@8
first and it didn’t try to install the optional dependencies (I assume where platform didn’t match? or not install optional dependencies at all?)Fix/Workaround
So if you’re stuck, see if you can upgrade
npm
to8
(which is also the default ofnode:16
if that’s an “easier” upgrade).Or, upgrade to
v11.13.0
which should have a fix.Pining to
v11.11
works finee.g.
docker run --rm -ti node:14 npm install -g firebase-tools@11.11.0
We are experiencing the same issue. On 2 different runs we had 2 similar but different errors.
Attempt 1:
Attempt 2: