Bacancy Technology
Bacancy Technology represents the connected world, offering innovative and customer-centric information technology experiences, enabling Enterprises, Associates and the Society to Riseâ„¢.
12+
Countries where we have happy customers
1050+
Agile enabled employees
06
World wide offices
12+
Years of Experience
05
Agile Coaches
14
Certified Scrum Masters
1000+
Clients projects
1458
Happy customers
Artificial Intelligence
Machine Learning
Salesforce
Microsoft
SAP
August 23, 2023
It appears that the upgrade process is looking for valid files to know what version it’s updating from, and if there is a missing or empty node_modules folder, Angular can’t tell what exactly is being updated and will throw this error. It makes sense because the CLI behaves differently based on the old version being upgraded and how many versions are being updated, so if it has nothing to read from for upgrading it can’t continue.
Kindly check first node_modules folder is missing or not. Make sure to run npm install before updating. To Update angular project, all the packages have to be installed beforehand.
Then you can use command
ng update @angular/cli @angular/core
If still you’re facing any issue with dependencies installation delete previous node_modules folder or remove using commands rm -r node_modules
Also you can only upgrade angular version one by one not from v7 to v11 or higher.
Angular has some dependencies, packages and coding standards compatibility issue occurs while upgrade application directly lower to higher, to avoid this you can use Angular Update.