Replies: 3 comments 6 replies
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
This is not an npm bug — it’s usually caused by 2FA enforcement changes and auth config conflicts. Try these steps:
Run: npm profile get --json If it shows: "twoFactorAuth": "auth-and-writes" then publishing always requires OTP. Fix options: Switch to token-based publishing (recommended for CI/teams) Or change to auth-only (not recommended for orgs) To disable OTP for publish (if allowed): npm profile set two-factor-auth=auth-only
Normal tokens now often fail for publish. Go to: ✅ Automation Then update .npmrc: registry.npmjs.org/:_authToken=YOUR_NEW_TOKEN Delete old tokens — they may auto-revoke.
Run: npm logout Then login again OR use only token.
This happens when auth fails silently. Also verify: npm whoami If it doesn’t return your username → auth is broken.
In package.json: "publishConfig": { About tokens being removed: npm recently auto-revokes insecure or legacy tokens. That’s why your tokens disappear. 👉 Solution: Use Automation token + scoped permissions. If this still fails, check npm status: But 95% of the time this is solved by switching to Automation token. |
Beta Was this translation helpful? Give feedback.
-
|
We still have this issue, this is causing a lot of harm to our company, and have customers complaining. I need help urgently, is there any one I can talk to or anything else to try? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
This has been discussed in other threads but all the workarounds that I was suggested still do not solve my problem.
If I do
npm login, follow the flow, and thennpm publishI always get the prompt:? This operation requires a one-time password:Since it is impossible to get a OTP at the moment and that message is probably coming from an outdated implementation, I can only assume something is fundamentally broken.
I need to urge you to fix this issue as it is really affecting our company at this point.
Also, the workaround I was using before of having a token in .npmrc just stopped working
In case it helps, our setup is a monorepo with a few packages.
I have even tryed reinstalling npm but no luck.
If I log out and rely only on the token I get this error instead:
lerna WARN notice Package failed to publish: package_name
lerna ERR! E404 Not found
lerna ERR! errno "undefined" is not a valid exit code - exiting with code 1
Please help
Edit: ALSO now for some reason my access tokens are being removed automatically??
Beta Was this translation helpful? Give feedback.
All reactions