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
  Use SD to install new OS over pinebook debian Rudy558 4 963 07-10-2021, 08:21 AM
Last Post: nightranger73
  What would be the right Pinephone OS for me? (mainly from Ubuntu background dev) jcun4128 7 1,908 01-24-2021, 06:01 AM
Last Post: ryo
  SIM Card Install pineme 2 1,140 01-19-2021, 03:13 AM
Last Post: ryo
  UBUNTU DOING ALL BUT MAKE/RECEIVE CALLS snow season 2 1,401 11-16-2020, 01:37 PM
Last Post: MonCon
  Reformatting postmarket os with ubuntu touch mackdaddy67 6 3,220 09-11-2020, 12:41 AM
Last Post: SwordfishII
  How to boot from the SD card and install to eMMC? ravanh 2 3,013 03-18-2020, 09:42 AM
Last Post: tophneal
  Install OS on RAID1 thanks to dual SATA board? Thatoo 12 5,899 05-15-2019, 02:55 PM
Last Post: Thatoo
  Rock64 suitable for headless TVHeadend install? elsmandino 3 3,090 06-26-2018, 11:37 AM
Last Post: Luke
  Here Is another mini-how-to to install Raspbian:DESKTOP/ETHERNET/HDMI speedro86 4 4,112 04-15-2018, 07:37 AM
Last Post: bunkerWHz
  sopine cluster board install Smurfbot 1 2,272 03-31-2018, 04:09 AM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 1 Guest(s)