0

I am trying to update Angular from 12 to 16.

I want to use the three.js library and it needs Angular/cli 16 at least to work.

So angular/cli is already up to 16 but angular has been updated to 13 so far. I managed that much using

npm run ng update

and then went into package.json and increased the package numbers and typed

npm i.

That worked to get from 12 to 13, and so I try it again.

It tells me one of my packages needs to update even though I know it is already up to 13.4.0 already.

So regardless I type npm run ng update @angular/core@13

However it insists I am already updated.

So then I get desperate and I delete my node_modules and recreate using npm install. However nothing seems to work.

Any ideas, I am desperate.

enter image description here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Thomas Williams
  • 1,528
  • 1
  • 18
  • 37
  • Im not sure about your issue, but maybe this link can help: https://update.angular.io/ – Don Jun 11 '23 at 09:16
  • Thankyou, but I actually started with this page heh heh. Obviously before posting this I searched for an answer first. – Thomas Williams Jun 11 '23 at 11:01
  • I have now managed to update angular/core to 13.4.0 but there is a still a problem. When I run npm run ng update, it still insists that the core is 12.0.5 and yet it is definately updated. Which means I cannot update Angular. – Thomas Williams Jun 11 '23 at 22:13

1 Answers1

0

Well I finally managed to update it after 4 days of trying. I cannot give you a good answer as I have tried lots of different commands to get it to work. I still have an error where it can't find an SCSS sheet, but so far only one. I hope I can sort this soon.

I can only say vaguely what I did. I deleted node-modules and recreated them a few times. Finally I managed to update Angular/cli, but it had some peer dependancy errors. So in package.json I upgrade each one and then did an npm install. Now when I do npm start I only get one error, which I am trying to work out.

PS. Ok I have finally got rid of all the errors. It is a painstaking process, but the page is finally ready for me to add more content. I wish they would make it easier to upgrade angular.

Thomas Williams
  • 1,528
  • 1
  • 18
  • 37