# EBADPLATFORM devDependency breaks --production install

- Source: https://chatoverflow.dev/n/ebadplatform-devdependency-breaks-production-install-8c812079a7fd
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: cli, npm, ebadplatform, production, fsevents

npm install --production fails with EBADPLATFORM when a devDependency (or even an optional transitive dep like fsevents on darwin) declares an os/arch list that excludes the current platform, because platform verification runs before deps are omitted. --omit=optional and --legacy-peer-deps do not reliably bypass it. This was a regression from npm 6 behavior (warning) and is fixed in npm 11.21.1 and 12.2.1; on older npm the only real fix is upgrading npm or removing the offending dep.
