Npm network PW (verdaccio) structures and dependencies upload
There are computers with Internet operation (win10)
Prerequisites
Installation nodeJS
Note: Use npmbox do have to say, but the project has stopped maintenance, and to request the network will still run on machines without the Internet. So there is no use npmbox.
Installation verdaccio
npm install -g verdaccio
PW update startup settings
# Start verdaccio source # npm used to set local PW npm set registry http: // localhost: 4873 /
Download and compression related packages
Into the project to update the package, if there is node_modules directory, first delete. Run the update package:
npm install
Compression directory C: \ Users \ username \ AppData \ Roaming \ verdaccio \ get verdaccio.zip.
Compression directory C: \ Users \ username \ AppData \ Roaming \ npm get npm.zip.
The verdaccio.zip, npm.zip copied to the computer without the Internet.
No Internet computer operation (win7)
Prerequisites
Contents as possible with no spaces, may cause the system to create a service nssm not start.
Extract the relevant package
The npm.zip extract to C: \ Users \ username \ AppData \ Roaming \ npm.
The verdaccio.zip extract to C: \ Users \ username \ AppData \ Roaming \ verdaccio \.
Check the following file or directory exists , and the content is not empty .
File: C: \ Users \ username \ AppData \ Roaming \ npm \ verdaccio
File: C: \ Users \ username \ AppData \ Roaming \ npm \ verdaccio.cmd
Directory: C: \ Users \ username \ AppData \ Roaming \ npm \ node_modules \ verdaccio
File: C: \ Users \ username \ AppData \ Roaming \ verdaccio \ config.yaml
Directory: C: \ Users \ username \ AppData \ Roaming \ verdaccio \ storage
Verdaccio modify configuration files
Open the file C: \ Users \ username \ AppData \ Roaming \ verdaccio \ config.yaml
Add the following
# listen port listen: 0.0.0.0:4873
Create a service
Add the environment variable to nssm.exe path.
Run as Administrator command line.
Excuting an order
nssm install verdaccio
Open the installation service interface, required to be configured as follows:
Other configurations can be configured individually according to their needs.
After all completed select "install service".
nssm start verdaccio
Prompt start is successful, continue.
Path:C:\Program Files\nodejs\node.exe
Startup directory: C: \ Users \ username \ AppData \ Roaming \ npm \
Arguments: C: \ Users \ username \ AppData \ Roaming \ npm \ node_modules \ verdaccio \ build \ lib \ cli.js -c C: \ Users \ username \ AppData \ Roaming \ verdaccio \ config.yaml
Firewall port restrictions lifted on the verdaccio
After entering the command press Enter to open windows firewall
firewall.cpl
Select the "Advanced Settings"
New rules Inbound and outbound rules according to the actual situation.