0

I'm trying to follow along with this tutorial to build a website in angular.

It tells the readers to install CLI like this:

npm install -g @angular/cli

I have opened Putty and logged in to my Ubuntu20.04 server, then typed this command. The server responded saying

"E: Unable to locate package npm"

I found the answer and solution to this problem here on Stack Overflow.

So I ran

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential

and finally

npm install -g @angular/cli

During the installation, the server told me about deprecated packages.

enter image description here

I am concerned that I'm following along an outdated tutorial for an outdated Angular. I have read that there are different versions (AngularJS, Angular "normal", etc.)

So I would like to know if that is actually the way to start working with Angular. I would like to use a framework that is up to date and actively maintained, etc.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
tmighty
  • 10,734
  • 21
  • 104
  • 218
  • 1
    `@angular/cli` is for Angular (2+), not AngularJS (1.x). If you want to be sure you're using up-to-date materials, read the actual docs: https://angular.io/tutorial, https://angular.io/cli. – jonrsharpe Jan 16 '21 at 22:07
  • I do believe it's totally ok, anyway with the `install` do you receive just warnings? or also errors? – Dario Piotrowicz Jan 16 '21 at 22:07
  • @DarioPiotrowicz I have added a screenshot of the warnings. No errors occured. – tmighty Jan 16 '21 at 22:07
  • Great! I've just seen it :) – Dario Piotrowicz Jan 16 '21 at 22:08
  • @jonrsharpe Thank for your the link to the tutorial. Had Google shown me this, I would have followed it. Obviously, the Google AI thought I should instead be given a tutorial that makes me ask many questions. – tmighty Jan 16 '21 at 22:11
  • 1
    Google *maintains* Angular, I see the official docs above everything else. – jonrsharpe Jan 16 '21 at 22:12

2 Answers2

2

Those Warnings are very very normal and you will get used to them when working on any node project (not just angular).

Basically this is related to how node works, your dependencies can have dependencies themselves, and so on, so because of this having this type or warning being a very common thing.

I have used node professionally and for personal projects, having all up-to-date tools and libraries and I encounter them anywhere.

Do not mind them, they aren't a problem and I can guarantee this is not the last time you'll see them.

Dario Piotrowicz
  • 951
  • 1
  • 6
  • 14
  • Sorry, just to clarify... I am talking about the `install` command and the warnings, I did not check out the tutorial, so I cannot say or not if it is up to date :) (I can have a look if you want, but that isn't what you're asking, is it?) – Dario Piotrowicz Jan 16 '21 at 22:14
  • Thank you, your answer is perfectly fine. jonrsharpe already pointed me to the official docs / tutorial, I love it, and I will use that instead. The official docs do it like in the tutorial that I originally wanted to follow, so the installation procedure is just the same. – tmighty Jan 16 '21 at 22:16
  • yeah! just follow the tour of heroes, that's how most get started, it is very very well made :) – Dario Piotrowicz Jan 16 '21 at 22:17
0

Yes, the official documentation guides you installing angular using this command, here is the offical docs page.
These warnings are normal, they are just letting you know about deprecated packages.

AzafoCossa
  • 874
  • 8
  • 18