I would like to create scoped packages without paying for npm private registry. I have a private git repository (accessible with ssh) but there is no documentation on how to do this and with which syntax.
Asked
Active
Viewed 101 times
1 Answers
0
You have to run your own private registry. See for example: npm Registry for your organisation.
Then as described in the npm scope documentation
You can associate a scope with a registry at login, e.g.
npm login --registry=http://reg.example.com --scope=@myco
or
You can also associate a scope with a registry using npm config:
npm config set @myco:registry http://reg.example.com

Ortomala Lokni
- 56,620
- 24
- 188
- 240
-
I want to use git or gitlab or something like this without hosting it – SCAREX Feb 18 '21 at 16:15
-
1Yes, you can either use the [Gitlab packages registry](https://docs.gitlab.com/ee/user/packages/npm_registry/) or use a [raw git repository](https://stackoverflow.com/a/7807279/1807667). – Ortomala Lokni Feb 21 '21 at 19:29