使用 npm 发布包时出现错误 402 [英] Getting Error 402 while publishing package using npm

查看:65
本文介绍了使用 npm 发布包时出现错误 402的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 ubuntu 14.04 上使用 npm 版本 2.15.11 和节点版本 4.7.2.我想发布我的包.当我使用命令时:

npm 发布

我收到错误消息:您需要付费帐户才能执行此操作.更多信息,请访问:

请为我提供解决此问题的解决方案.提前致谢.

解决方案

运行

npm publish --access=public

第一次发布范围包.

默认访问设置是私有的,但为此您需要一个付费帐户.因此出现错误消息.

I am using npm version 2.15.11 and node version 4.7.2 on ubuntu 14.04. I want to publish my packages. when i use the command:

npm publish

i am geting the error: You need a paid account to perform this action. For more info, visit: https://www.npmjs.com/private-modules

Below is the screenshot of error:

Please provide me the solution to overcome this issue. Thanks in advance.

解决方案

Run

npm publish --access=public

the first time you publish a scoped package.

The default access setting is private, but for this you need a paid account. Hence the error message.

这篇关于使用 npm 发布包时出现错误 402的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆