Publishing scoped npm package for free?
Asked Answered
A

2

7

Am I correct that publishing a scoped npm package (@foo/bar), even as --access=public, is not free?

It results in a Failed PUT 404 (or 402) error. Is this because one needs a (paid) npm organization @foo?

Update (Mar '17): Npm organisations are now free

Adrenocorticotropic answered 12/7, 2016 at 21:15 Comment(0)
T
7

Yes, because to publish a module with scope @foo you need an organization named @foo. So the scope is defined by having created an organization of the same name, and organizations per se are not free.

Basically the rules are:

  • If you want to publish a package for free, don't scope it.
  • If you want to scope a package, you have to pay for it.
Tratner answered 15/7, 2016 at 16:43 Comment(1)
As of 2017-03-22 public orgs are free blog.npmjs.org/post/158718200065/announcing-free-orgsDiary
T
-3

You can publish a scoped package for free if you are logged in to npm as user 'foo'.

Trelu answered 28/2, 2017 at 17:55 Comment(3)
What is the password then? :)Adrenocorticotropic
Anyway I've just tried, attempting to publish to under @myuser still results in Failed PUT 402 You need a paid account to perform this action. For more info, visit: https://www.npmjs.com/private-modulesAdrenocorticotropic
Scoped packages are by default private and private modules are not free. You need to explicitly publish them as public.Kowalewski

© 2022 - 2024 — McMap. All rights reserved.