From dd1a4cba76ea51307205f877e0d627903a5328f1 Mon Sep 17 00:00:00 2001 From: Nate Aune Date: Sat, 6 Dec 2025 11:24:19 -0500 Subject: [PATCH] fix: remove optional=false from .npmrc to fix esbuild installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: npm install was failing with the error: Error: Expected "0.21.5" but got "0.18.20" This occurred because esbuild's install.js validates that the installed binary version matches the package.json version, but was finding an older cached binary. Root cause: The .npmrc setting `optional=false` was preventing esbuild from downloading its platform-specific binary package (@esbuild/darwin-arm64, etc.). These platform binaries are marked as optionalDependencies in esbuild's package.json. Without the correct platform binary, esbuild's postinstall script would find a stale/cached binary from a previous installation and fail the version check. Troubleshooting steps taken: 1. Attempted rm -rf node_modules && npm install - same error 2. Cleared npm cache with npm cache clean --force - same error 3. Checked for global esbuild installations - none found 4. Reviewed npm config and found optional=false in .npmrc 5. Ran npm install --include=optional - succeeded 6. Removed optional=false from .npmrc to permanently fix The fund=false and audit=false settings are retained as they don't affect dependency installation, only npm's output behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .npmrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.npmrc b/.npmrc index 4bbdf00..1223b5c 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,2 @@ -optional=false fund=false audit=false