PINE64
Install node.js on Ubuntu (via npm) - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: General (https://forum.pine64.org/forumdisplay.php?fid=1)
+--- Forum: Getting Started (https://forum.pine64.org/forumdisplay.php?fid=21)
+--- Thread: Install node.js on Ubuntu (via npm) (/showthread.php?tid=1009)



Install node.js on Ubuntu (via npm) - Zhara - 05-10-2016

I needed the latest version of node.js (6.x) on my new pine64. When I installed node.js via apt-get, the 4.x version was installed.

So this is, what I did to get node.js 6.x:

First I installed npm:
> sudo apt-get install npm

After that I could install node.js via npm
> sudo npm i node-linux-arm64 -g

Checking the version:
> node -v
v6.1.0

Done  Smile
#nodejs #node.js


RE: Install node.js on Ubuntu (via npm) - PapaStahl - 06-20-2016

(05-10-2016, 06:42 PM)Zhara Wrote: I needed the latest version of node.js (6.x) on my new pine64. When I installed node.js via apt-get, the 4.x version was installed.

So this is, what I did to get node.js 6.x:

First I installed npm:
> sudo apt-get install npm

After that I could install node.js via npm
> sudo npm i node-linux-arm64 -g

Checking the version:
> node -v
v6.1.0

Done  Smile
#nodejs #node.js

Do you think the instructions on this page will work with the Pine64? They also include MongoDB..
https://github.com/aspnetde/nodejs-webserver-guide


RE: Install node.js on Ubuntu (via npm) - Zhara - 06-21-2016

(06-20-2016, 09:52 AM)PapaStahl Wrote:
(05-10-2016, 06:42 PM)Zhara Wrote: I needed the latest version of node.js (6.x) on my new pine64. When I installed node.js via apt-get, the 4.x version was installed.

So this is, what I did to get node.js 6.x:

First I installed npm:
> sudo apt-get install npm

After that I could install node.js via npm
> sudo npm i node-linux-arm64 -g

Checking the version:
> node -v
v6.1.0

Done  Smile
#nodejs #node.js

Do you think the instructions on this page will work with the Pine64? They also include MongoDB..
https://github.com/aspnetde/nodejs-webserver-guide

Some parts of that guide might be helpful, but maybe you should not always rely on that and adapt it to your needs.

As far as I have seen, this uses a quite old version of node! So I am not sure, if you really want to go this way. I guess it is more secure to use latest available versions (at least in my case, I wanted node with latest ES6-features). 

Be sure to always install AMD64 packages(!).


RE: Install node.js on Ubuntu (via npm) - PapaStahl - 06-22-2016

(06-21-2016, 12:46 AM)Zhara Wrote:
(06-20-2016, 09:52 AM)PapaStahl Wrote:
(05-10-2016, 06:42 PM)Zhara Wrote: I needed the latest version of node.js (6.x) on my new pine64. When I installed node.js via apt-get, the 4.x version was installed.

So this is, what I did to get node.js 6.x:

First I installed npm:
> sudo apt-get install npm

After that I could install node.js via npm
> sudo npm i node-linux-arm64 -g

Checking the version:
> node -v
v6.1.0

Done  Smile
#nodejs #node.js

Do you think the instructions on this page will work with the Pine64? They also include MongoDB..
https://github.com/aspnetde/nodejs-webserver-guide

Some parts of that guide might be helpful, but maybe you should not always rely on that and adapt it to your needs.

As far as I have seen, this uses a quite old version of node! So I am not sure, if you really want to go this way. I guess it is more secure to use latest available versions (at least in my case, I wanted node with latest ES6-features). 

Be sure to always install AMD64 packages(!).

Excellent! Thank you, I will! :-)


RE: Install node.js on Ubuntu (via npm) - johnr - 06-24-2016

You probably need add an updated repository. I remember having this issue with the raspberry pi the default repositories included the older package.

Following these instrutructions on rasp pi work for me https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions


RE: Install node.js on Ubuntu (via npm) - Zhara - 08-22-2016

On Debian I am now installing it this way:

# wget https://nodejs.org/dist/v6.4.0/node-v6.4.0-linux-arm64.tar.gz
# tar -xvf node-v6.4.0-linux-arm64.tar.gz
# cd node-v6.4.0-linux-arm64
# sudo cp -R * /usr/local/

Then you should get:

# node -v
v6.4.0
# npm -v
3.10.3