问题:
我正在尝试发布我的npm包https://www.npmjs.com/package/react-native-ultimate-modal-picker
,但它出现了错误。我上一次发表文章已经9个月了,我刚刚更新了大量的代码和文件。我还将发布从NPM设置为GitHub,但我认为我恢复了这些更改
问题:
- 为什么我会出现以下错误
- 如何确保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`
流程:
npm login
- 输入登录信息(用户名:
jefelewis
( org.couchdb.user:jefelewis
不在npm注册表中- 问题是我的用户名是
jefelewis
(https://www.npmjs.com/~jefelewis(
更新:这是通过在终端中使用npm config set registry https://registry.npmjs.org/
修复的