I am trying to do server-side-rendering in my angular application created in version 14.I tried the command "ng add @nguniversal/[email protected]" at that time error occur. And the error is "ng add @nguniversal/[email protected] Skipping installation: Package already installed Schematic input does not validate against the Schema: {"project":"FLYBUILDS","appId":"serverApp","main":"main.server.ts","appDir":"app","rootModuleFileName":"app.server.module.ts","rootModuleClassName":"AppServerModule","skipInstall":true} Errors:
Data path "" must NOT have additional properties(appDir). " how to solve this error?
If you're facing issues adding Angular Universal with Express Engine to an Angular 14 project, and encountering errors with the command:
Solution: I encountered a similar problem, and here's how I resolved it:
Compatibility Check: Ensure that the versions of Angular Universal and Angular CLI are compatible with Angular 14
Update Angular CLI: Update your Angular CLI to the latest version using the following command:
Use Latest Angular Universal: Instead of specifying a version, try installing the latest version of Angular Universal:
Clear npm Cache: Clear the npm cache to prevent potential caching issues:
Retry Installation: After performing the above steps, try running the installation command again:
Hope this helps!