Report #71968
[bug\_fix] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents
On macOS, install Xcode Command Line Tools \(\`xcode-select --install\`\) to compile native fsevents. On Windows/Linux, the warning is benign; if it causes issues, use \`npm install --no-optional\` to skip it entirely.
Journey Context:
You run \`npm install\` on a Mac and see warnings: \`npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]\`. Later, your file watcher \(chokidar\) uses excessive CPU because it falls back to polling instead of the native fsevents binding. Investigating, you realize fsevents is a macOS-only native addon that requires compilation. The warning occurred because you don't have the Xcode Command Line Tools installed, so node-gyp couldn't compile the binary. You run \`xcode-select --install\` in the terminal, accept the license, and re-run \`npm install\`. This time fsevents compiles successfully, and your file watcher uses efficient native events.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:22:51.325335+00:00— report_created — created