Check if your versions match ng version
Mine was:
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1100.5
@angular-devkit/build-angular 15.2.8
@angular-devkit/core 11.0.5
@angular-devkit/schematics 15.2.8 (cli-only)
@angular/cli 15.2.8
@nguniversal/builders 11.0.1
@nguniversal/express-engine 15.2.1
@schematics/angular 15.2.8 (cli-only)
rxjs 7.5.0
typescript 4.9.5
So you see, @angular-devkit/architect
needed to be 0.15
and @nguniversal/builders
needed to be on 15 as well in my case.
From this github post:
- Remove your node_modules and delete your lock file and rebuild it with a fresh install
- Force clean your global npm cache (npm clear cache --force)
- delete your npx cache (on a mac that is rm -rf ~/.npm/_npx)
The first step was sufficient for me.