Angular 2 -- Upgrade to Angular 5 -- Guidance?

angularjs

#1

I am really enjoying the Angular2 courses in the Learning Paths
I finished the Node.js learning path, the beginning javascript learning path, and then the full stack javascript learning path.

I am excited to continue with Angular2 and finish this learning path...

However, and I am embarrassed to admit this since the instructor carefully made it very clear that we should stick to Angular2...I tried to upgrade to the current version.

I couldn't help it!!! :slight_smile: I really wanted the -cli functioning and -- well, anyway...my app broke.

I am a pretty quick learner...I am hoping someone would be willing to point me in the right direction to help me fix what I broke. It's way way beyond what I am comfortable with...

I have been reading in the documentation at Angular and I understand some of it but it's really -- I am stuck.

Any guidance is very very appreciated. Thank you!!


#2

The best way to fix the problem is to restore things back to how it was from a backup.


#3

Did the instructor have you install any packages globally?

If not, you should just be able to delete your node_modules folder and re-run npm i to have npm pull in the correct dependencies (i.e. Angular 2).

If you have packages installed globally, either remove them and re-install the correct versions, or look into using a Node version manager. Using a version manager, you can pull in a fresh copy of Node (i.e. a different version from the one you have installed) and start from scratch.

Or, if you want to stay with version 5 and you'd like help fixing errors and so on, we'll need to see some code.


#4

Thank you both for your replies -- I sat for a bit with my question and then remembered github :slight_smile: I did in fact take my repo for that project and start fresh...

I am using node version manager...and that idea kind of sounds interesting to try. I might see what I can do to teach myself how to upgrade to Angular5 but at least now it's not an imminent issue.

Thank you again, so much for your replies.


#5

It can help to have a guide to help you through the process. Here's an article called How to upgrade from Angular 2 to Angular 5 apps that does a good job of it.


#6

Thank you! I didn't really expect to enjoy this stuff so much.
Appreciate this.


#8