PINE64

Full Version: Install node.js on Ubuntu (via npm)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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
(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(!).
(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! :-)
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-m...tributions
On Debian I am now installing it this way:

# wget https://nodejs.org/dist/v6.4.0/node-v6.4...m64.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