npm ERR! code EOTP — This operation requires a one-time password from your authenticator
Your npm account has 2FA for writes and no one-time password was supplied.
Seen on:
npm
Meaning
Interactive publishes prompt for OTP; CI can’t. Use an automation or granular token that’s allowed to bypass 2FA for publishing.
Common causes
- 2FA enabled for writes
- Publishing from CI with a regular token
⚡ Quick fix
- Pass --otp=123456 when publishing manually
- Use an automation/granular access token in CI
Detailed fix by platform
npm
npm publish --otp=123456
How to diagnose
- Token — Automation token in CI?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026