Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! 404 Not Found - Scope not found #82

Open
shanejix opened this issue Dec 6, 2021 · 0 comments
Open

npm ERR! 404 Not Found - Scope not found #82

shanejix opened this issue Dec 6, 2021 · 0 comments
Labels
Bug Something isn't working

Comments

@shanejix
Copy link
Owner

shanejix commented Dec 6, 2021

同步链接: https://www.shanejix.com/posts/npm ERR! 404 Not Found - Scope not found/

执行 npm publish 时报错

npm notice
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@xxx%2fxxx - Scope not found
npm ERR! 404
npm ERR! 404  '@xxx/xxx@0.0.0' is not in this 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\Administrator\AppData\Local\npm-cache\_logs\2021-12-06T14_56_55_018Z-debug.log

如果要使用名称 @scope/package 在 NPM 上发布包,则需要确保 Namespace @scope 在 NPM 上存在。需要创建该命名空间,需要使用 @scope 名称在 NPM 上创建组织

创建该组织后,加入组织并登录

npm login

登录成功后,发布名为 @scope/firstpackage 的包

npm publish --access public

或者,在package.json 中写入

  "publishConfig": {
    "access": "public"
  },

然后执行

npm publish

未设置 publishConfigaccess会报 npm ERR! 402 Payment Required 错误如下:

npm notice
npm ERR! code E402
npm ERR! 402 Payment Required - PUT https://registry.npmjs.org/@xxx%2fxxx - You must sign up
for private packages

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-12-06T15_00_50_580Z-debug.log

references

作者:shanejix
出处:https://www.shanejix.com/posts/npm ERR! 404 Not Found - Scope not found/
版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
声明:转载请注明出处!

@shanejix shanejix added the Bug Something isn't working label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant