首页 > 解决方案 > 尝试发布 npm 包时出错

问题描述

我上周发布得很好,但我今天试过了,它在我的任何电脑上都不起作用。很奇怪,起初我以为服务有问题,但后来我开始做一些我在网上找到的解决方案,现在我在尝试时得到了这个npm adduser

npm ERR! code E404
npm ERR! 404 Not Found - PUT https://npm.pkg.github.com/estebanpadilla/-/user/org.couchdb.user:ludusy
npm ERR! 404 
npm ERR! 404  'org.couchdb.user:ludusy' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because 
npm ERR! 404  1. name can only contain URL-friendly characters
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/estebanpadilla/.npm/_logs/2020-08-11T03_27_17_364Z-debug.log

我到处寻找可能的解决方案,但似乎没有任何效果。

npm whoami给出这个结果:

npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/estebanpadilla/.npm/_logs/2020-08-11T03_29_57_501Z-debug.log

有没有人知道如何让它再次工作?

谢谢你。

标签: npm-publish

解决方案


看起来您还没有登录。我认为您需要运行npm adduser并按照提示进行操作。

只是一个快速提示 - 请务必仔细阅读错误消息。我认为这条线准确地告诉你你需要做什么!npm ERR! need auth You need to authorize this machine using npm adduser.


推荐阅读