Skip to content

Conversation

@ochafik
Copy link
Collaborator

@ochafik ochafik commented Dec 3, 2025

Summary

Fixes npm start failing with "Cannot find module @rollup/rollup-darwin-arm64" when using npm v10.9.2 + Node.js v23.10.0.

Problem

npm has a known bug where it fails to install optional dependencies from nested packages when using Node.js v23. Rollup requires platform-specific native binaries as optional dependencies, but npm wasn't installing them, causing vite to fail.

Solution

Added common platform-specific rollup binaries to optionalDependencies:

  • macOS ARM64 & x64
  • Linux x64 & ARM64
  • Windows x64

Since these are optional dependencies, only the binary for the current platform gets installed.

Testing

Verified npm start now works successfully on macOS ARM64 with Node.js v23.10.0.

@jonathanhefner jonathanhefner merged commit 7eac6f6 into main Dec 3, 2025
5 checks passed
@fredericbarthelet fredericbarthelet mentioned this pull request Dec 4, 2025
9 tasks
@ochafik ochafik deleted the ochafik/fix-npm-opt-deps branch December 13, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants