angular アプリケーションを実行すると、以下のエラーが発生します。このエラーはかなりランダムに表示されます。これを解決するには、すべてのノード モジュールを削除し、npm キャッシュをクリアしてから、アプリを実行するためにすべてのパッケージを何度も再インストールする必要がありますが、しばらくすると、このエラーがランダムにポップアップし始めます。このエラーは、私のチームの他のメンバーには表示されず、全員が同じ構成とバージョンを使用しています。これは ng2-daterangepicker@2.0.12 のために来ています
Angular バージョン - 10.2.4
Uncaught Error: Type Daterangepicker does not have 'ɵmod' property.
at getNgModuleDef (core.js:1855)
at recurse (core.js:24235)
at recurse (core.js:24246)
at recurse (core.js:24246)
at registerNgModuleType (core.js:24231)
at new NgModuleFactory$1 (core.js:24345)
at compileNgModuleFactory__POST_R3__ (core.js:27894)
at PlatformRef.bootstrapModule (core.js:28132)
at Module.zUnb (main.ts:11)
at __webpack_require__ (bootstrap:84)
パッケージ.json
"dependencies": {
"@angular/animations": "10.2.4",
"@angular/cdk": "10.2.7",
"@angular/common": "10.2.4",
"@angular/compiler": "10.2.4",
"@angular/core": "10.2.4",
"@angular/forms": "10.2.4",
"@angular/localize": "10.2.4",
"@angular/material": "10.2.7",
"@angular/material-moment-adapter": "11.0.0",
"@angular/platform-browser": "10.2.4",
"@angular/platform-browser-dynamic": "10.2.4",
"@angular/platform-server": "10.2.4",
"@angular/router": "10.2.4",
"@ng-select/ng-select": "4.0.0",
"@ngrx/effects": "10.1.2",
"@ngrx/entity": "10.1.2",
"@ngrx/store": "10.1.2",
"@ngx-pwa/local-storage": "10.1.0",
"@storybook/addon-controls": "6.0.21",
"@swimlane/ngx-charts": "13.0.2",
"@swimlane/ngx-datatable": "17.0.0",
"@types/jquery": "3.3.31",
"ajv": "6.10.2",
"angular2-prettyjson": "3.0.1",
"angular2-query-builder": "0.4.2",
"bootstrap": "3.3.7",
"core-js": "3.8.2",
"d3": "4.13.0",
"d3-tip": "0.7.1",
"html-webpack-plugin": "3.2.0",
"md5": "2.2.1",
"moment": "2.29.1",
"ng2-daterangepicker": "2.0.12",
"ng2-search-filter": "0.5.1",
"ngx-clipboard": "12.2.0",
"ngx-order-pipe": "2.0.3",
"ngx-pagination": "3.2.1",
"node-sass": "4.14.1",
"primeicons": "1.0.0",
"primeng": "7.1.3",
"prismjs": "1.17.1",
"ramda": "0.26.1",
"redux": "4.0.0",
"require": "2.4.20",
"reselect": "3.0.1",
"rxjs": "6.6.3",
"subsink": "1.0.0",
"tslib": "2.0.0",
"uuid": "3.3.3",
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular-builders/jest": "10.0.1",
"@angular-devkit/build-angular": "0.1002.1",
"@angular-devkit/build-ng-packagr": "0.1002.0",
"@angular/cli": "10.2.1",
"@angular/compiler-cli": "10.2.4",
"@angular/language-service": "10.2.4",
"@babel/core": "7.12.10",
"@babel/preset-env": "7.12.11",
"@compodoc/compodoc": "1.1.11",
"@ngrx/store-devtools": "10.1.2",
"@storybook/addon-actions": "6.0.19",
"@storybook/addon-docs": "6.0.19",
"@storybook/addon-links": "6.0.19",
"@storybook/addon-notes": "5.3.20",
"@storybook/addons": "6.0.19",
"@storybook/angular": "6.0.19",
"@storybook/theming": "6.0.19",
"@testing-library/angular": "10.3.0",
"@testing-library/dom": "7.29.3",
"@types/jasmine": "3.6.2",
"@types/jasminewd2": "2.0.3",
"@types/jest": "24.9.1",
"@types/node": "14.14.20",
"angular2-template-loader": "0.6.2",
"autoprefixer": "8.6.5",
"babel-loader": "8.2.2",
"codelyzer": "6.0.1",
"husky": "4.2.5",
"jasmine-core": "3.6.0",
"jasmine-marbles": "0.5.0",
"jasmine-spec-reporter": "6.0.0",
"jest": "26.6.0",
"jest-junit": "12.0.0",
"jest-preset-angular": "8.1.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
"karma-cli": "2.0.0",
"karma-coverage-istanbul-reporter": "2.0.1",
"karma-jasmine": "4.0.1",
"karma-jasmine-html-reporter": "1.5.4",
"lint-staged": "10.0.0",
"ng-packagr": "10.1.2",
"prettier": "2.0.5",
"protractor": "7.0.0",
"rxjs-tslint": "0.1.8",
"scss-bundle": "2.5.1",
"sinon": "9.2.2",
"ts-node": "9.0.0",
"tslint": "6.1.3",
"typescript": "3.9.5",
"wallaby-webpack": "3.9.16",
"webpack": "4.5.0",
"webpack-cli": "4.3.1"
}