Install node.js on Ubuntu (via npm)
#1
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
#2
(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
#3
(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(!).
#4
(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! :-)
#5
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
#6
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


Possibly Related Threads…
Thread Author Replies Views Last Post
  linux-headers and quartz64-post-install package conflicts Berzerkleyfan 2 1,330 12-01-2023, 05:17 AM
Last Post: Berzerkleyfan
  PBP Debian 11 GRUB install error zlth 2 2,513 11-18-2022, 07:42 AM
Last Post: zlth
  Reformatting postmarket os with ubuntu touch mackdaddy67 6 9,459 09-11-2020, 12:41 AM
Last Post: SwordfishII
  wrong launguage install chadace 1 4,398 06-08-2020, 08:31 PM
Last Post: chadace
  How to boot from the SD card and install to eMMC? ravanh 2 7,048 03-18-2020, 09:42 AM
Last Post: tophneal
  Install OS on RAID1 thanks to dual SATA board? Thatoo 12 17,457 05-15-2019, 02:55 PM
Last Post: Thatoo
  Rock64 suitable for headless TVHeadend install? elsmandino 3 7,165 06-26-2018, 11:37 AM
Last Post: Luke
  Here Is another mini-how-to to install Raspbian:DESKTOP/ETHERNET/HDMI speedro86 4 8,995 04-15-2018, 07:37 AM
Last Post: bunkerWHz
  sopine cluster board install Smurfbot 1 4,848 03-31-2018, 04:09 AM
Last Post: pfeerick
  Sopine A64 doesn't boot ubuntu stixcher 5 8,737 12-03-2017, 11:05 AM
Last Post: tllim

Forum Jump:


Users browsing this thread: 1 Guest(s)