gpt4 book ai didi

npm 发布失败 PUT 402

转载 作者:行者123 更新时间:2023-12-03 07:15:18 27 4
gpt4 key购买 nike

正在学习一门让我完成 Bash 教程的类(class)。到目前为止,我被困在代码要求我发布代码的部分。我的指示如下:

 What good is a package manager without packages?  

Not very good.

Luckily, that is not a problem for npm, because it's very easy for all
npm users to publish their modules and share them with the world.

Packages get into the registry by using the `npm publish` command.

Try it now. There's not much to it.

(Make sure you're still in the right project directory, though. If you
publish something by mistake, you can remove it, but there's no guarantee
that no one saw it in the meantime.)

Then run `how-to-npm verify` when you're done.

我的代码是:

jsf2008:~/workspace/dev (master) $ npm publish
npm ERR! publish Failed PUT 402
npm ERR! code E402
npm ERR! You must sign up for private packages : @jsf2008/quit
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2017-08-22T14_44_29_746Z-debug.log
jsf2008:~/workspace/dev (master) $

我在这里迷路了。我什至在任何地方都找不到错误 PUT 402 。任何帮助将不胜感激。

最佳答案

您正在使用NPM Scoped packages 。默认情况下它们是私有(private)的,需要为私有(private)帐户支付 NPM 费用。如果您的包是公共(public)的,您可以使用 --access=public 标志,如下所示:

npm publish --access=public

关于npm 发布失败 PUT 402,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45820881/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com