简体   繁体   中英

How to make offline installation of node-inspector?

How to offline install node-inspector on Windows server? The code is here: https://github.com/node-inspector/node-inspector https://www.npmjs.com/package/node-inspector

To my best knowledge, it's not possible to install Node Inspector (or any npmjs package) directly from npmjs.org and/or github.com without a working internet connection. However, you can prepare a self-containing package on a machine that does have internet connection, and then install this package on an offline host.

Here are the instructions, assuming Unix system.

  1. On the machine connected to the internet

     $ mkdir tempdir && cd tempdir $ npm init # fill any data to prompts $ npm install node-inspector $ cd node_modules/node-inspector $ tar czf ../../node-inspector.tgz . $ cd ../.. 
  2. Copy node-inspector.tgz to the offline machine and unpack it in the directory of your choice, eg $HOME/node-inspector or /usr/local/lib/node_modules/node-inspector

  3. Create symlinks for node-inspector and node-debug in a folder that is in your PATH . For example:

     $ cd /usr/local/bin $ ln -s ../lib/node_modules/node-inspector/bin/node-inspector . $ ln -s ../lib/node_modules/node-inspector/bin/node-debug . 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM