Angular: Uncaught TypeError: Cannot read property 'call' of undefined
Angular: Uncaught TypeError: Cannot read property 'call' of undefined
我正在开展一个 angular 9 项目,在该项目中,我借助以下步骤使用 AWS Amplify 实现了自行设计的用户身份验证:https://gerard-sans.medium.com/build-your-first-full-stack-serverless-app-with-angular-and-aws-amplify-d2e4716de9bd。另外,我在后端集成了 graphQL。并且整个项目在本地运行良好并在部署时抛出错误。它在部署时显示以下错误。
我正在使用以下 angular 依赖项:
"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"
},
将我的 Angular 版本从 9 更新到 11 对我有用。
我正在开展一个 angular 9 项目,在该项目中,我借助以下步骤使用 AWS Amplify 实现了自行设计的用户身份验证:https://gerard-sans.medium.com/build-your-first-full-stack-serverless-app-with-angular-and-aws-amplify-d2e4716de9bd。另外,我在后端集成了 graphQL。并且整个项目在本地运行良好并在部署时抛出错误。它在部署时显示以下错误。
我正在使用以下 angular 依赖项:
"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"
},
将我的 Angular 版本从 9 更新到 11 对我有用。