我有一个应用程序具有延迟加载的模块,并且在尝试启动我的应用程序时继续遇到此错误:
No module factory available for dependency type: ContextElementDependency
我正在使用相同版本的Angular依赖项。我还删除了node_modules文件夹和package-lock.json
文件,并重新安装了依赖项,但该错误仍然存在。谁能告诉我该怎么做才能解决此错误?
package.json
{
"name": "genesis-ui",
"version": "1.8.1",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.config.json",
"localstart": "ng serve --proxy-config local-proxy.config.json",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.2.4",
"@angular/common": "^4.2.4",
"@angular/compiler": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/platform-browser": "^4.2.4",
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
"@angular/upgrade": "^4.2.4",
"@angular2-material/core": "2.0.0-alpha.8-3",
"@ng-idle/core": "2.0.0-beta.12",
"@ng-idle/keepalive": "2.0.0-beta.12",
"@progress/kendo-angular-buttons": "1.0.5",
"@progress/kendo-angular-charts": "1.2.3",
"@progress/kendo-angular-dateinputs": "1.0.6",
"@progress/kendo-angular-dropdowns": "1.1.3",
"@progress/kendo-angular-grid": "1.3.2",
"@progress/kendo-angular-inputs": "1.1.0",
"@progress/kendo-angular-intl": "1.2.2",
"@progress/kendo-angular-l10n": "1.0.3",
"@progress/kendo-angular-upload": "1.1.1",
"@progress/kendo-data-query": "1.0.6",
"@progress/kendo-theme-default": "2.40.0",
"@types/hammerjs": "2.0.34",
"angular-calendar": "0.20.1",
"angular2-datatable": "0.6.0",
"angular2-jwt": "0.2.3",
"angular2-ladda": "1.2.1",
"angular2-moment": "1.7.0",
"angular2-prettyjson": "2.0.5",
"angular2-text-mask": "8.0.3",
"angular2-toaster": "4.0.1",
"auth0-js": "8.9.1",
"auth0-lock": "11.2.3",
"chart.js": "2.6.0",
"core-js": "2.5.0",
"dragula": "3.7.2",
"hammerjs": "2.0.8",
"install": "0.10.4",
"jquery": "3.2.1",
"lodash": "4.17.4",
"moment": "2.19.1",
"mydatepicker": "2.0.27",
"ng2-charts": "^1.6.0",
"ng2-drag-drop": "2.9.2",
"ngx-bootstrap": "1.8.1",
"ngx-bootstrap-modal": "1.0.8",
"ngx-charts": "3.0.2",
"ngx-dragula": "0.0.1",
"ngx-gallery": "1.1.7",
"ngx-select": "0.0.1",
"ngx-tabs": "0.0.13",
"rxjs": "5.4.3",
"tinymce": "4.6.5",
"toastr": "2.1.2",
"ts-helpers": "1.1.2",
"zone.js": "0.8.16"
},
"devDependencies": {
"@angular/cli": "^1.3.0",
"@angular/compiler-cli": "^4.2.4",
"@progress/kendo-angular-excel-export": "1.0.3",
"@progress/kendo-drawing": "1.2.0",
"@types/jasmine": "2.5.53",
"@types/jquery": "3.2.11",
"@types/node": "8.0.22",
"codelyzer": "3.1.2",
"jasmine-core": "2.7.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "1.7.0",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "1.3.0",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.1.2",
"ts-node": "3.3.0",
"tslint": "5.6.0",
"typescript": "2.3.4",
"webpack": "3.10.0"
}
}
问题抛出的错误与Angular No module factory available for dependency type: ContextElementDependency相同,但是由于某种原因,通过解决该个人问题的答案并不能解决同一情况。