我今天将我的 Angular 应用程序更新到了版本 9,它在没有 IVY 编译器的情况下运行良好。
一旦我启用 Ivy,我就会收到以下错误(在应用程序启动时)并且不知道如何继续。
它似乎与更改检测器参考和管道有关,但是当我使用自定义管道时,没有人使用更改检测器。
runtime.js:26 错误错误:没有为@angular/core 符号“ɵɵinjectPipeChangeDetectorRef”提供值。在 R3JitReflector.push../node_modules/@angular/compiler/fesm5/compiler.js.R3JitReflector.resolveExternalReference (vendor.js:36836) 在 JitEmitterVisitor.push../node_modules/@angular/compiler/fesm5/compiler.js。 JitEmitterVisitor.visitExternalExpr (vendor.js:36772) 在 ExternalExpr.push../node_modules/@angular/compiler/fesm5/compiler.js.ExternalExpr.visitExpression (vendor.js:31428) 在 JitEmitterVisitor.push../node_modules/@ angular/compiler/fesm5/compiler.js.AbstractEmitterVisitor.visitInvokeFunctionExpr (vendor.js:36217) 在 JitEmitterVisitor.push../node_modules/@angular/compiler/fesm5/compiler.js.AbstractJsEmitterVisitor.visitInvokeFunctionExpr (vendor.js:36572)在 InvokeFunctionExpr.push..
按照要求:
{
"name": "mycompanyname",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
"@angular/animations": "^9.0.0",
"@angular/cdk": "^8.2.3",
"@angular/common": "^9.0.0",
"@angular/compiler": "^9.0.0",
"@angular/core": "^9.0.0",
"@angular/flex-layout": "^9.0.0-beta.29",
"@angular/forms": "^9.0.0",
"@angular/material": "^8.2.3",
"@angular/material-moment-adapter": "^8.2.3",
"@angular/platform-browser": "^9.0.0",
"@angular/platform-browser-dynamic": "^9.0.0",
"@angular/router": "^9.0.0",
"@datorama/akita": "^4.17.0",
"@datorama/akita-ng-router-store": "^4.0.0",
"@datorama/akita-ngdevtools": "^3.0.2",
"@microsoft/signalr": "^3.1.0",
"@types/applepayjs": "^3.0.0",
"@types/braintree-web": "^3.47.0",
"@types/fb": "0.0.23",
"@types/gapi": "0.0.39",
"@types/gapi.auth2": "0.0.51",
"@types/google.analytics": "0.0.40",
"@types/google.visualization": "0.0.51",
"@types/hammerjs": "^2.0.36",
"@types/highlight.js": "^9.12.3",
"@types/jwt-decode": "^2.2.1",
"@types/lodash-es": "^4.17.3",
"@types/mailcheck": "^1.1.31",
"@types/smoothscroll-polyfill": "^0.3.1",
"@types/universal-analytics": "^0.4.3",
"@types/uuid": "^3.4.6",
"@types/vkbeautify": "^0.99.2",
"@types/youtube": "0.0.38",
"braintree-web": "^3.56.0",
"core-js": "^3.5.0",
"dependency-tree": "^7.2.0",
"fast-safe-stringify": "^2.0.7",
"hammerjs": "^2.0.8",
"highlight.js": "^9.17.1",
"immer": "^5.0.1",
"intersection-observer": "^0.7.0",
"json2typescript": "^1.2.3",
"jwt-decode": "^2.2.0",
"lodash-es": "^4.17.15",
"lottie-web": "^5.5.10",
"mailcheck": "^1.1.1",
"moment": "^2.24.0",
"ng-in-viewport": "^6.0.3",
"ng2-google-charts": "^4.0.0",
"ngx-cookie": "^4.1.2",
"ngx-highlightjs": "^4.0.2",
"ngx-markdown": "^8.2.1",
"ngx-md": "^8.0.0",
"normalize.css": "^8.0.1",
"normalizr": "^3.4.1",
"pretty-data": "^0.40.0",
"rxjs": "^6.5.3",
"rxjs-etc": "^9.6.2",
"safe-json-stringify": "^1.2.0",
"slugify": "^1.3.6",
"smoothscroll-polyfill": "^0.4.4",
"svg-inline-loader": "^0.8.0",
"tslib": "^1.10.0",
"uuid": "^3.3.3",
"vkbeautify": "^0.99.3",
"web-animations-js": "^2.3.2",
"webpack-visualizer-plugin": "^0.1.11",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.1",
"@angular/cli": "^9.0.1",
"@angular/compiler-cli": "^9.0.0",
"@angular/language-service": "^9.0.0",
"@nguniversal/express-engine": "^8.2.6",
"@types/jasmine": "^3.5.0",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^12.11.1",
"akita-schematics": "^2.0.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"ts-node": "~8.5.4",
"tslint": "~5.20.1",
"typescript": "^3.7.5",
"webpack-bundle-analyzer": "^3.6.0"
}
}
我现在在浏览器中逐步浏览,看看我能找到什么。
丢失的符号有时出现在R3JitReflector.context
(它正在寻找它的地方),有时不在那里: