Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howto:nodejs_create_npm_bundel [2017/04/27 19:26] (current)
yehuda created
Line 1: Line 1:
 +====== HowTo: Nodejs create NPM bundel ======
  
 +You use npm install & pack 
 +First on a machine that is online you install 
 +<code bash>
 +npm install pm2  
 +</code>
 +Then you pack it up 
 +<code bash>
 +npm pack pm2  
 +</code>
 +That gives you a tar file -- you copy that tar file to your offline machine and install, like 
 +<code bash>
 +npm install pm2-2.2.1.tgz  
 +</code>
 +The above however only create a tarball for the specific module expluding dependencies, and you may still have dependencies that you need to resolve. While you could simply walk through and pack every dependency manually, there is a modules that will automated that for you 
 +<code bash>
 +npm install -g npm-bundle  
 +</code>
 +Then you can do 
 +<code bash>
 +npm-bundle pm2  
 +</code>
 +for the individual packages, or if you have a package.json for your project 
 +<code bash>
 +npm-bundle  
 +</code>
 +to pack everything in one big tarball 
 +
 +source: http://stackoverflow.com/questions/41156556/what-exact-command-is-to-install-pm2-on-offline-rhel
howto/nodejs_create_npm_bundel.txt ยท Last modified: 2017/04/27 19:26 by yehuda
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0