npm-publish - 尝试发布 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 adduser
并按照提示进行操作。
只是一个快速提示 - 请务必仔细阅读错误消息。我认为这条线准确地告诉你你需要做什么!npm ERR! need auth You need to authorize this machine using npm adduser
.
推荐阅读
- android - 导航抽屉中的 TabLayout 与工具栏重叠
- android - 无法在空对象上调用方法 containsKey()
- angular - 更新失败:TypeError:无法读取未定义的属性“注入器”
- javascript - 如何修复 angular.min.js:108 TypeError: Cannot read property 'length' of undefined error is shown Angular js pagination
- bash - 在bash中捕获一个psql(PostgreSQL)命令错误,可以通用,与sql无关
- php - 在foreach中使用递归函数替换PHP数组值
- python - Python:从字符串中删除选定的空格
- vuejs2 - vue-i18n - 检测“未知”类型的令牌
- reactjs - 如何设置 aws-sdk 以从 s3 存储桶中的公共文件中获取文件内容?
- javascript - 动态加载图像,图像错误时中断循环