npm install keeps failing

Diagnoses a failing `npm install`, covering a permission error, a native addon build failure, and corrupted cache/lockfile state, and routes to the right fix rather than guessing which one applies.

Run this

Read-only

Attempt the install and capture how it fails

npm install

Matched against this step's known patterns to pick the next step.

View full flow
  • resolvedkind: outcome
  • clear_cachekind: recipe_ref
    • outcome: success → retry_clean_install
    • default → unknown_failure
  • native_rebuildkind: recipe_ref
    • outcome: success → resolved_native
    • default → clear_cache
  • resolved_nativekind: outcome
  • unknown_failurekind: outcome
  • check_error_type (entry)kind: diagnostic
    • match "EACCES|permission denied" → permission_issue
    • match "gyp ERR|node-gyp|MODULE_NOT_FOUND.*bindings" → native_rebuild
    • default → clear_cache
  • permission_issuekind: outcome
  • retry_clean_installkind: recipe_ref
    • outcome: success → resolved
    • default → unknown_failure