2

I am trying to install NPM on my machine without any Internet connection. Through some research on the Web I have come across suggestions to use npmbox. So I gave npmbox a try but when I try to bin/npmunbox /path/to/npm.npmbox (npm.npmbox being the offline package of NPM) to install NPM into my machine, there is an error:

/usr/bin/env: node: No such file or directory

Why do I need NPM?

The overall problem is that I am trying to install elasticsearch-head into the machine and there is a package.json file which requires npm install to install and also npm run start to get the interface to run. Thus my question.

Some additional information you may want

OS => RHEL6

ELK Stack Version => 5.5.0 (can't install elasticsearch-head as a plugin, deprecated)

Can someone help me with any of the 2 problems I have? Any additional information that you need can be provided to you. Thanks in advance!

P.S. I am very new to NPM so if I missed out any obvious solutions please forgive my ignorance.

  • 1
    You have installed node as well as NPM, right? – Burgi Aug 04 '17 at 08:35
  • In addition it's likely that the install will download further files and (node) modules. – Seth Aug 04 '17 at 11:31
  • @Burgi both node and NPM are on my machine with Internet connection.. however, I am trying to install these on a machine with no Internet connection and I do not know how to go about doing that. – clamismagic Aug 06 '17 at 13:01
  • @Seth as long as I am able to install NPM or even activate elasticsearch-head offline, I do not mind downloading further files and modules as long as the process can be done offline completely (e.g no `curl`) – clamismagic Aug 06 '17 at 13:03

1 Answers1

0

Download the latest portable node.js. It has the following features:

  • Runs a NodeJS instance in a command line shell.
  • Includes the Node Package Manager (NPM).
  • Completely portable - runs off a USB, SD or hard drive.
  • Does not require administrator privileges.
  • No need for any external software - simply download extract and run!
  • Packaged in PortableApps.com format for easy integration.

To upgrade npm, use the following process:

  • Download an NPM release tar
  • Extract the NPM tar into the global node_modules folder as npm_new
  • Rename the existing npm folder to npm_old
  • Rename the npm_new folder to npm

References

Paul Sweatte
  • 729
  • 5
  • 16