Getting error when run npm run build:ssr command in angular app after add angular universal

Getting error when run npm run build:ssr command in angular app after add angular universal.

Error is like with NGCC:

NGCC failed.
at NgccProcessor.process (C:[email protected]_processor.js:129:19)
at [email protected]:110:27
at Hook.eval [as call] (eval at create (PATHnode_modulestapablelibHookCodeFactory.js:19:10), :12:1)
at Hook.CALL_DELEGATE [as _call] (PATHnode_modulestapablelibHook.js:14:14)
at Compiler.newCompilation (PATHnode_moduleswebpacklibCompiler.js:1033:30)
at PATHnode_moduleswebpacklibCompiler.js:1076:29
at Hook.eval [as callAsync] (eval at create (PATHnode_modulestapablelibHookCodeFactory.js:33:10), :22:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (PATHnode_modulestapablelibHook.js:18:14)
at Compiler.compile (PATHnode_moduleswebpacklibCompiler.js:1071:28)
at PATHnode_moduleswebpacklibCompiler.js:498:12
An unhandled exception occurred: NGCC failed.
See "PATHLocalTempng-8cJrwdangular-errors.log" for further details

Here is my package.json file

dependencies": {
"@agm/core": "^1.1.0",
"@angular/animations": "^12.0.4",
"@angular/cdk": "^12.0.4",
"@angular/common": "^12.0.4",
"@angular/compiler": "^12.0.4",
"@angular/core": "^12.0.4",
"@angular/fire": "^6.0.4",
"@angular/forms": "^12.0.4",
"@angular/platform-browser": "^12.0.4",
"@angular/platform-browser-dynamic": "^12.0.4",
"@angular/platform-server": "^12.0.4",
"@angular/router": "^12.0.4",
"@angular/service-worker": "^12.0.4",
"@kolkov/angular-editor": "^1.1.7",
"@nguniversal/express-engine": "^12.0.1",
"@types/googlemaps": "^3.43.3",
"agm-direction": "^0.8.9",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"devextreme": "21.1.3",
"devextreme-angular": "21.1.3",
"express": "^4.15.2",
"firebase": "^8.6.5",
"intro.js": "^2.9.3",
"jquery": "^3.4.1",
"ng2-dragula": "^2.1.1",
"ng2-tooltip-directive": "^2.9.22",
"ngx-cookie-service": "3.1.3",
"ngx-toastr": "^10.0.4",
"rxjs": "^7.1.0",
"tslib": "^2.0.0",
"util": "^0.12.4",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.0.3",
"@angular/cli": "^12.0.3",
"@angular/compiler-cli": "^12.0.4",
"@angular/language-service": "^12.0.4",
"@nguniversal/builders": "^12.0.1",
"@types/express": "^4.17.0",
"@types/jquery": "^3.3.29",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"protractor": "^7.0.0",
"ts-node": "~4.1.0",
"tslint": "~6.1.3",
"typescript": "~4.2.4"
}

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.