npm publish发布到在线仓库时,提示:Scope not found

当`npm publish`发布时,控制台提示:`Scope not found`,具体错误信息如下:

bash 复制代码
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

这是由于包名是`@xxx/xxx`形式造成的。如果包名是`@`开头,需要到npm官网先创建一个组织。

**具体步骤如下:**

  1. 注册`npm`官网账号,并且进入个人中心

  2. 看到页面左侧菜单栏,点击后面的加号

  1. 进入创建组织页面,输入组织名称。(这里不需要加上`@`符号)

如果组织名称已经存在页面会提示:

  1. 再次执行`npm publish`命令,这是就可以正常发布。
相关推荐
Highcharts.js1 小时前
Highcharts 云端渲染的真相:交互式图表与服务器端生成的边界
前端·信息可视化·服务器渲染·highcharts·图表渲染
zhuyan1082 小时前
Linux 系统磁盘爆满导致无法启动修复指南
前端·chrome
编程牛马姐3 小时前
独立站SEO流量增长:提高Google排名的优化方法
前端·javascript·网络
NotFound4863 小时前
实战指南如何实现Java Web 拦截机制:Filter 与 Interceptor 深度分享
java·开发语言·前端
Dontla3 小时前
高基数(High Cardinality)问题介绍(Prometheus、高基数字段、低基数字段)
前端·数据库·prometheus
whuhewei5 小时前
为什么客户端不存在跨域问题
前端·安全
妮妮喔妮6 小时前
supabase的webhook报错
开发语言·前端·javascript
yivifu6 小时前
手搓HTML双行夹批效果
前端·html·html双行夹注
奔跑的卡卡7 小时前
Web开发与AI融合-第一篇:Web开发与AI融合的时代序幕
前端·人工智能
IT_陈寒7 小时前
Redis批量删除的大坑,差点让我加班到天亮
前端·人工智能·后端