-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Incident: NPM Login Failure Blocking Package Installation
Summary
Unable to install packages from private registry due to npm login failing with "Exit handler never called!" error.
Severity
High - Blocks package installation and updates
Symptoms
- Package install returns
E401 - Incorrect or missing password npm loginfails with:
npm error Exit handler never called!
npm error This is an error with npm itself.
- Browser-based auth flow never completes
Root Cause
Known npm CLI bug where exit handler fails during SSO/browser-based authentication with private registries. Auth token is never saved to .npmrc.
Workaround
Manually generate access token via registry web UI and add to .npmrc:
Expected Behavior
Running npm login should open a browser window, complete SSO authentication, and save the auth token to .npmrc, allowing subsequent package installations to succeed.
Steps To Reproduce
- Run
npm loginagainst a private registry using browser-based SSO authentication - Press ENTER when prompted to open browser
- Observe "Exit handler never called!" error before browser auth can complete
- Attempt to install a package from the private registry
- Receive
E401 - Incorrect or missing passworderror
Environment
- npm: 10.8.2
- Node.js: v20.18.3
- OS: macOS 26.1
- System: Mac
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps