Nikolay
Nikolay

Reputation: 1

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

Upvotes: 0

Views: 388

Answers (1)

Miroslav Bajtoš
Miroslav Bajtoš

Reputation: 10785

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, e.g. $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 .
    

Upvotes: 1

Related Questions