Skip to content

Instantly share code, notes, and snippets.

@satishgunjal
Created November 21, 2019 20:18
Show Gist options
  • Save satishgunjal/edd652706ea430e79550ea5cde54877b to your computer and use it in GitHub Desktop.
Save satishgunjal/edd652706ea430e79550ea5cde54877b to your computer and use it in GitHub Desktop.
How to transfer nodejs project supporting packages/libraries if internet not working on host PC
1. Run below command on terminal from where you want to copy the packeges or supprting files
"npm pack"
for more details about this command ref. https://docs.npmjs.com/cli/pack.html
2. Now copy the entire source code folder icluding 'node_modules' on host PC
3. And run below command from host PC terminal 'npm install <name>-<version>.tgz'. Here name is from step 1
4. Now your code should work on host PC.
5. In case any error change the project name in 'package.json' on host PC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment