发布 NPM 包时出现问题(org.couchdb.user:USERNAME' 不在 npm 注册表中)

Issue with Publishing NPM Package (org.couchdb.user:USERNAME' is not in the npm registry)

问题:

我正在尝试发布我的 npm 包 https://www.npmjs.com/package/react-native-ultimate-modal-picker,但出现了错误。自从我上次发布以来已经 9 个月了,我刚刚更新了大量代码和文件。我还将 NPM 的发布设置为 GitHub,但是 我想我恢复了这些更改?

问题:

  1. 为什么我会收到以下错误?
  2. 如何确保 npm 包发布到 https://www.npmjs.com/package/react-native-ultimate-modal-picker

错误:

org.couchdb.user:jefelewis' is not in the npm registry.

This package name is not valid, because 
npm ERR! 404  1. name can only contain URL-friendly characters
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`

进程:

  1. npm login
  2. 输入登录信息(用户名:jefelewis
  3. org.couchdb.user:jefelewis 不在 npm 注册表中。
  4. 问题是我的用户名是 jefelewis (https://www.npmjs.com/~jefelewis)

更新: 这是通过在终端

中使用 npm config set registry https://registry.npmjs.org/ 修复的