首页 新闻 会员 周边 捐助

npm publish 时报错:"This operation requires a one-time password"

0
悬赏园豆:30 [已解决问题] 解决于 2024-12-16 11:02

在 npmjs.com 后台设置中创建了 classic token,然后用这个 token 发布 npm 包时报错:

npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access
npm error code EOTP
npm error This operation requires a one-time password from your authenticator.
npm error You can provide a one-time password by passing --otp=<code> to the command you ran.
npm error If you already provided a one-time password then it is likely that you either typoed
npm error it, or it timed out. Please try again.

请问如何解决这个问题?

npm
dudu的主页 dudu | 高人七级 | 园豆:29642
提问于:2024-12-16 10:45
< >
分享
最佳答案
0

改为创建 Granular Access Token,然后换成这个 token 就可以了

dudu | 高人七级 |园豆:29642 | 2024-12-16 11:01
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册