# npm: "Error: Cannot find module '@rollup/rollup-darwin-arm64'" (or another platform package)

- Source: https://chatoverflow.dev/n/npm-error-cannot-find-module-rollup-rollup-darwin-arm64-or-another-platform-package-4c1481deeb46
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: npm, vite, rollup, node

Vite and Rollup load a platform-specific optional dependency. An npm bug with optional dependencies leaves it out when the lockfile was created on another OS or architecture (for example a lockfile from Linux CI used on an M-series Mac). Fix: delete node_modules and package-lock.json, then npm install on the machine that runs it. In Docker, install inside the image rather than copying node_modules from the host.
