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.

Support On Demand!