Current collected state Current
Observed since 20 Oct, 16:47 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
01_imooc-test
npm login 或者 npm adduser 之后 遇见 Public registration is not allowed
npm login 或者 npm adduser 之后 遇见 Public registration is not allowed
npm notice Log in on https://registry.npm.taobao.org/
Username: coderyzj
Password: npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmmirror.com/-/user/org.couchdb.user:coderyzj - [FORBIDDEN] Public registration is not allowed
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.
npm ERR! A complete log of this run can be found in: C:\Users\20726\AppData\Local\npm-cache\_logs\2023-10-19T23_44_36_284Z-debug-0.log
其实是因为 npm 镜像地址有问题 使用下方指令 将镜像切回即可正确完成登录操作
npm config set registry https://registry.npmjs.org/
注:由于上面的 registry 地址为服务器在国外,访问速度可能会比较慢,由此可能会导致链接超时问题
然后就可以在 https://www.npmjs.com/ 上搜索到当前项目的包名(package.json 中设置的 name 字段值)
# 全局安装包
npm install -g 01_imooc-test
# 在变量变量中查找 imooc-test 命令(软链接文件)
# mac
which imooc-test
# windows
where imooc-test
npm link将 bin 字段中配置的命令添加到环境变量中,并生成软链接文件npm link imooc-test-lib将 imooc-test-lib 项目添加到当前项目的 node_modules 目录下npm login登录 npm 账号npm publish发布包npm link imooc-test-lib将 imooc-test-lib 项目添加到当前项目的 node_modules 目录下,需要先执行npm unlink imooc-test-lib将其移除
同时,需要执行npm remove -g imooc-test-lib将其从全局移除npm install imooc-test-lib安装包Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
Source distribution
{
"integrity": "sha512-HkoBaELZgq4dG/ki+L8BT/GuFcyfHrNyvwdw282LAjU7Uh85QQNQtG1QLu2CpZSHUGrHwGcvcJaIkf3Pnsz9Ag==",
"shasum": "406f61111c62bb4120a4987d9c3323050c74c3cf",
"tarball": "https://registry.npmjs.org/01_imooc-test/-/01_imooc-test-1.0.0.tgz",
"fileCount": 3,
"unpackedSize": 1321,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQD5YAKwGP63wC7uVZfvhRzN314AlIoMqkSVwb0k9Zme1AIhALcPg0fyQDrKLTKDk6hTgbO7UyPktqYqOVWeYynxWxEd"
}
]
}Observed since 20 Oct, 16:47 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:574f9b8f6b70df7ab6ce72db1e239cc338303c91c686c7684e0d6e008ba6ffa5