在npm发布时,抛出以下错误。以前曾运行过。
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@XYZ - Not found
npm ERR! 404
npm ERR! 404 '@XYZ@5.0.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
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! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2021-11-11T06_46_42_252Z-debug.log
3条答案
按热度按时间twh00eeo1#
运行npm login命令
然后再次发布
fnx2tebb2#
我通过将注册表从
https://registry.npmjs.org
更改为https://registry.npmjs.org/
来解决这个问题,行的末尾有一个额外的斜线。ars1skjm3#
在我的例子中,在检查我是通过
npm whoami
登录的之后,我需要被添加到拥有我想要发布打包的repo的组织中。