Skip to content

EBADPLATFORM from npm ci when running on netlify with >= 12.2.9 #5323

@tjenkinson

Description

@tjenkinson

Describe the bug

npm ci on netlify fails with

7:41:18 PM: npm ERR! code EBADPLATFORM
7:41:18 PM: npm ERR! notsup Unsupported platform for @esbuild/[email protected]: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"})
7:41:18 PM: npm ERR! notsup Valid OS:    android
7:41:18 PM: npm ERR! notsup Valid Arch:  arm
7:41:18 PM: npm ERR! notsup Actual OS:   linux
7:41:18 PM: npm ERR! notsup Actual Arch: x64
7:41:18 PM: npm ERR! A complete log of this run can be found in:
7:41:18 PM: npm ERR!     /opt/buildhome/.npm/_logs/2022-12-18T19_41_17_238Z-debug-0.log

See build run here

Steps to reproduce

View this test repo.

It does not contain a package-lock, meaning the first npm i generates a package-lock on the instance. It then does an npm ci, which fails with the error above.

This did not used to happen with versions <= 12.2.8.

Ref video-dev/hls.js#5114
Ref video-dev/hls.js#5115

Configuration

https://github.com/tjenkinson/netlify-cli-install-error/blob/main/netlify.toml

Environment

My local environment shouldn't be relevant for this. Please see the repro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions