Angular: Uncaught TypeError: Cannot read property ‘call’ of undefined

I am working on an angular 9 project where I implemented self-designed user authentication using AWS Amplify with the help of the following steps: https://gerard-sans.medium.com/build-your-first-full-stack-serverless-app-with-angular-and-aws-amplify-d2e4716de9bd. Also, I integrated graphQL in the backend. And the whole project runs fine locally and throws an error on deployment. It shows the following error on deployment.
Screenshot of Error

I am using the following angular dependencies:
"dependencies": {
"@angular/animations": "~9.0.7",
"@angular/cdk": "^10.2.7",
"@angular/common": "~9.0.7",
"@angular/compiler": "~9.0.7",
"@angular/core": "~9.0.7",
"@angular/forms": "~9.0.7",
"@angular/localize": "^9.1.12",
"@angular/material": "^10.2.7",
"@angular/platform-browser": "~9.0.7",
"@angular/platform-browser-dynamic": "~9.0.7",
"@angular/router": "~9.0.7",
"@apollo/client": "^3.0.0",
"@fortawesome/angular-fontawesome": "^0.7.0",
"@fortawesome/fontawesome-svg-core": "^1.2.31",
"@fortawesome/free-solid-svg-icons": "^5.15.0",
"@nestjs/graphql": "^7.9.4",
"@ng-bootstrap/ng-bootstrap": "^5.1.4",
"@swimlane/ngx-datatable": "^16.0.2",
"angular-calendar": "^0.28.22",
"angularx-flatpickr": "^6.5.1",
"apollo-angular": "^2.1.0",
"apollo-server-express": "^2.19.1",
"aws-amplify": "^3.3.13",
"aws-amplify-angular": "^5.0.42",
"bcryptjs": "^2.4.3",
"bootstrap": "^4.5.2",
"date-fns": "^2.16.1",
"flatpickr": "^4.6.6",
"graphql": "^15.4.0",
"graphql-tools": "^7.0.2",
"jsonwebtoken": "^8.5.1",
"ngx-cookie-service": "^11.0.2",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.7",
"@angular/cli": "~9.0.7",
"@angular/compiler-cli": "~9.0.7",
"@angular/language-service": "~9.0.7",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"graphql-cli": "^4.1.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
"typescript": "~3.7.5"
},

Source: Angular Questions

Leave a Reply

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