Monday, March 12, 2018

Install node.js binaries




  1. Download the node.js binaries here:
    https://nodejs.org/en/download/
  2. Extract the file:
    $ tar xvf node-v8.10.0-linux-armv7l.tar.xz
  3. (optional) Move the binaries to target path:
    $ move node-v8.10.0-linux-armv7l /usr/local/lib/nodejs/
  4. Set path in ~/.profile
    # Nodejs
    export NODEJS_HOME=/usr/local/lib/nodejs/node-v8.10.0
    export PATH=$NODEJS_HOME/bin:$PATH
Now source .profile, mkdir nodejs_test, npm init should create package.json. You can try 
$ npm install express -save
to see if npm is working properly.

No comments: