I would like to create local npm registry with sinopia and then publish there all packages from my projects node_modules
directory. Effectively I want to be able to run npm install --registry="http://localhost:4873"
in my project offline and get all the needed dependencies from local registry. Is there a simple way of doing this?
Asked
Active
Viewed 310 times
1

Konrad C
- 67
- 3
1 Answers
0
sinopia
will cache registries that it pulls from npmjs.org
by default.
If you set up your registry to use your sinopia one, then do a clean npm install
(delete node_modules
prior to running it) through it (while sinopia is connected to the internet), it should pull down all of the packages from npmjs.org
and cache them.
After that, subsequent calls with sinopia disconnected should use the one it has cached locally and work as intended.

samanime
- 25,408
- 15
- 90
- 139
-
Thats what i read in the documentation but it is not working for me, I'm getting an error that no such package is available. From what im seeing it cannot find packages within namespaces(starting with @ like '@angular/core') – Konrad C Nov 30 '17 at 15:15