Describe the bug
I have just started migrating my Astro projects from Vercel to Netlify and I hit this bug that I'm unsure how to handle.
Prerequisites for triggering the bug
- I use npm as a package manager in my project
- I installed netlify-cli in my project as a local dependency
- netlify-cli has a shrinkwrap file
- netlify-cli depends on rollup, which depends on os-specific packages like
@rollup/rollup-android-arm-eabi, @rollup/rollup-android-arm64, and so on.
The bug
I am unable to run npm ci after adding netlify-cli to my project. It crashes with the following error:
$ npm ci
11.2.0
npm error code EBADPLATFORM
npm error notsup Unsupported platform for @rollup/rollup-android-arm-eabi@4.52.2: wanted {"os":"android","cpu":"arm"} (current: {"os":"darwin","cpu":"arm64"})
npm error notsup Valid os: android
npm error notsup Actual os: darwin
npm error notsup Valid cpu: arm
npm error notsup Actual cpu: arm64
npm error A complete log of this run can be found in: /Users/angelikacathor/.npm/_logs/2025-11-10T14_51_35_010Z-debug-0.log
I created a very simple repository to reproduce the bug, see "steps to reproduce".
The underlying cause has been reported to npm (npm/cli#7622), but they don't seem to be in hurry to fix it (reported over a year ago).
My assumptions
- npm is a widely-used package manager so Netlify would want to fully support it.
- Installing netlify-cli as a local dependency is supported because the docs suggest doing so.
- Running
npm ci instead of npm install is a good practice because it only installs exactly the dependencies and versions listed in the lock file.
Solutions?
Does anyone else out here experience the same problem? I didn't see it reported yet.
Can Netlify do anything to help?
I understand that technically npm should fix the underlying cause, but they aren't doing it. Could you somehow create a second version of the netlify-cli package meant for local installations that doesn't have a shrinkwrap file? I saw that there were other complaints about the shrinkwrap. Or maybe there is a way to get rid of those os-specific rollup packages from the shrinkwrap without affecting any functionality? Or maybe at least the documentation should be appended to warn about this problem and how to work around it? Assuming I'm not the only one that this happens to.
Possible workarounds?
I could see a few possible workarounds on my side, but all of them are potentially disrupting:
- Switch to a different package manager
- Not great because it's lot of work, many of my projects are affected, might bring about other bugs and limitations.
- Switch to using netlify-cli globally
- Not great because I will lose the ability to ensure that each team member and the CI are running the same version.
- Give up on using
npm ci
- Not great because it will make CI runs less useful for catching problems early, and make deployments more risky.
Did anyone else try any of those workarounds? Am I missing something? Any advice would be appreciated!
Steps to reproduce
- Clone the repository https://github.com/angelikatyborska/netlify-cli-test
- Open a terminal, navigate to the repository, and run
npm ci
Configuration
No response
Environment
System:
OS: macOS 26.1
CPU: (11) arm64 Apple M3 Pro
Memory: 91.16 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - /Users/angelikacathor/.asdf/installs/nodejs/22.14.0/bin/node
npm: 11.2.0 - /Users/angelikacathor/.asdf/plugins/nodejs/shims/npm
pnpm: 10.12.4 - /Users/angelikacathor/Library/pnpm/pnpm
bun: 1.2.15 - /Users/angelikacathor/.bun/bin/bun
Describe the bug
I have just started migrating my Astro projects from Vercel to Netlify and I hit this bug that I'm unsure how to handle.
Prerequisites for triggering the bug
@rollup/rollup-android-arm-eabi,@rollup/rollup-android-arm64, and so on.The bug
I am unable to run
npm ciafter adding netlify-cli to my project. It crashes with the following error:I created a very simple repository to reproduce the bug, see "steps to reproduce".
The underlying cause has been reported to npm (npm/cli#7622), but they don't seem to be in hurry to fix it (reported over a year ago).
My assumptions
npm ciinstead ofnpm installis a good practice because it only installs exactly the dependencies and versions listed in the lock file.Solutions?
Does anyone else out here experience the same problem? I didn't see it reported yet.
Can Netlify do anything to help?
I understand that technically npm should fix the underlying cause, but they aren't doing it. Could you somehow create a second version of the netlify-cli package meant for local installations that doesn't have a shrinkwrap file? I saw that there were other complaints about the shrinkwrap. Or maybe there is a way to get rid of those os-specific rollup packages from the shrinkwrap without affecting any functionality? Or maybe at least the documentation should be appended to warn about this problem and how to work around it? Assuming I'm not the only one that this happens to.
Possible workarounds?
I could see a few possible workarounds on my side, but all of them are potentially disrupting:
npm ciDid anyone else try any of those workarounds? Am I missing something? Any advice would be appreciated!
Steps to reproduce
npm ciConfiguration
No response
Environment
System:
OS: macOS 26.1
CPU: (11) arm64 Apple M3 Pro
Memory: 91.16 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - /Users/angelikacathor/.asdf/installs/nodejs/22.14.0/bin/node
npm: 11.2.0 - /Users/angelikacathor/.asdf/plugins/nodejs/shims/npm
pnpm: 10.12.4 - /Users/angelikacathor/Library/pnpm/pnpm
bun: 1.2.15 - /Users/angelikacathor/.bun/bin/bun