How to install Node.js 6.4.0 on Ubuntu 16.04

Node.JS 6.4.0 recently released, is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

nodejs

Node.JS 6.4.0 changelog

  • build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms
  • child_process, cluster: Forked child processes and cluster workers now support stdio configuration
  • child_process: argv[0] can now be set to arbitrary values in spawned processes
  • fs: fs.ReadStream now exposes the number of bytes it has read so far
  • repl: The REPL now supports editor mode
  • util: inspect() can now be configured globally using util.inspect.defaultOptions

Install Node.js 6.4.0 on Ubuntu 16.04

  • Install some prerequisites

<pre>sudo apt-get update

sudo apt-get install build-essential libssl-dev

<ul style="text-align: justify;">
  <li>
    Download the nvm installation script from the<a href="https://github.com/creationix/nvm">project&#8217;s GitHub page</a> and run it
  </li>
</ul>

<pre>curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh

bash install_nvm.sh

<ul style="text-align: justify;">
  <li>
    Close your Terminal screen and open it again to gain access to the nvm functionality. Then run the following commands
  </li>
</ul>

<pre>nvm list

nvm ls-remote

nvm install 6.4.0

nvm use 6.4.0

nvm alias default 6.4.0

<ul style="text-align: justify;">
  <li>
    Note: When you install Node.js using nvm, the executable is called node. To view the version installed, simpy run the following commands
  </li>
</ul>

<pre>node -v</pre>

<ul style="text-align: justify;">
  <li>
    Update the npm to latest version
  </li>
</ul>

<pre>npm install -g npm

npm -v

<div title="Output">
</div>
 
comments powered by Disqus