I would like to know if Node.js is available in Ubuntu Core and if yes, how I can install it.
I see this issue Node on Snappy Ubuntu, but it says nothing.
Thank you very much.
If you need Nodejs for your application, convert your application to snap (with snapcraft) and install it
snap install <your application> . Nodejs is then packaged in the snap and you do not need to extra install it. Otherwise may be Ubuntu Server is better suited for you.
This worked for me.
I used the info here: Install applications in Ubuntu core
sudo snap install classic --devmode --edge
To enable aptitude, then your normal:
sudo apt-get install nodejs nodejs-legacy npm
sudo npm i -g npm
To get NPM to version: 3.5.2 and Node to: 4.2.6
Then NPM can't be updated further this way, as it complains about the version of Node that breaks NPM. Normally to update NPM I'd use 'n':
sudo npm i -g n
sudo n stable
But as NPM doesn't work with this version of Node that's not happening.
I found this How can I update my nodeJS to the latest version? and used:
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
Now Node version is: 8.9.4, and NPM can once again be updated as usual; and you can also use NPM to install 'n' and update Node however you want if you need a specific version.
Then you can install git to clone your app or do whatever.
You've probably already solved your problem, but offering a possible solution in case anyone else is after one.