Sunday, February 10, 2019

Installing Node.js and Npm in Ubuntu 18.04

If we want to work with Angular we need to install Npm packet manager and the more easy way I have found was the one given by NodeSourcode:

You have to change version for your desired version (11, 10, 8 or 6)
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ sudo apt-get install -y nodejs
Before we go ahead and install Angular we should configure a folder for global packages this is taken from John Papa blog :
$ mkdir ~/.npm-packages
$ sudo npm config set prefix ~/.npm-packages
Now we can install Angular or any other Npm packet without sudo:
$ npm install -g @angular/cli
You'll need to edit the PATH variable of your session for ng command you will use come from ~/.npm-packages:

nano ~/.profile

export PATH=~/.npm-packages/bin:$PATH



If the above doesn't work, check out this link : https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

Taller de ingeniería de Big Data

Los siguientes procedimientos corresponden al material complementarío del taller de ingeniería de Big Data que será dado de forma presencial...