#angular #webpack #package.json
Вопрос:
Недавно я обновил свой угловой проект с 4->6, и он компилируется, но я получаю ошибку >Ошибка неперехваченного типа: WEBPACK_ИМПОРТИРОВАННЫЙ_МОДУЛЬ_0__угловой_ядро.OpaqueToken не является конструктором при оценке (webpack-внутренний:///200:5) в объекте. (приложение. js:868) в webpack_require (polyfills.js:55)
Я провел глобальный поиск OpaqueToken, но нигде не могу найти его в своем коде. Как вы думаете, в чем причина этого?
пакет.json
{
"name": "printreef",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"@angular/animation": "4.0.0-beta.8",
"@angular/animations": "6.1.10",
"@angular/cli": "^6.2.9",
"@angular/common": "6.1.10",
"@angular/compiler": "6.1.10",
"@angular/compiler-cli": "6.1.10",
"@angular/core": "6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "6.1.10",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@angular/platform-server": "6.1.10",
"@angular/router": "6.1.10",
"@material/select": "^10.0.0",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.28",
"@toverux/ngsweetalert2": "1.2.2",
"@types/jquery": "^3.5.5",
"@types/jspdf": "1.1.31",
"@types/node": "16.3.2",
"@types/underscore": "1.8.1",
"angular-2-dropdown-multiselect": "1.9.0",
"angular-google-recaptcha": "^1.0.3",
"angular-l10n": "3.4.1",
"angular2-image-upload": "0.6.6",
"angular2-jwt": "0.2.3",
"angular2-moment": "^1.9.0",
"angular2-social-auth": "3.0.3",
"angular2-swiper": "0.8.1",
"bootstrap": "4.0.0-alpha.6",
"bootstrap-select": "^1.13.18",
"currency-symbol-map": "4.0.2",
"drag-drop-webkit-mobile": "1.4.1",
"flow-bin": "0.81.0",
"flow-typed": "2.5.1",
"jquery": "^3.5.1",
"jspdf": "1.3.5",
"jspdf-autotable": "2.3.2",
"md-select": "0.0.1-alpha.1",
"moment": "^2.24.0",
"ng-custom-select": "^2.0.4",
"ng2-dnd": "4.2.0",
"ng2-file-upload": "1.2.1",
"ng2-page-scroll": "^4.0.0-beta.12",
"ngx-cookie": "3.0.1",
"ngx-gallery": "5.3.1",
"ngx-infinite-scroll": "0.5.2",
"ngx-mydatepicker": "2.1.5",
"ngx-owl-carousel-o": "0.1.2",
"ngx-password-toggle": "^1.0.3",
"ngx-phone-mask": "2.1.3",
"ngx-sharebuttons": "3.0.0",
"ngx-siema": "2.0.0",
"ngx-toastr": "10.2.0",
"ngx-uploader": "^11.0.0",
"rxjs-compat": "^6.6.7",
"save": "^2.4.0",
"sweetalert2": "6.9.1",
"to-string-loader": "1.1.5",
"typescript": "4.1.3",
"typings": "2.1.1",
"underscore": "1.8.3",
"yarn": "1.7.0",
"yarn.lock": "0.0.1-security"
},
"devDependencies": {
"angular2-template-loader": "0.6.2",
"awesome-typescript-loader": "3.2.1",
"copy-webpack-plugin": "4.0.1",
"core-js": "2.4.1",
"css-loader": "0.28.4",
"es6-shim": "0.35.3",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"html-loader": "0.4.5",
"html-webpack-plugin": "2.29.0",
"json-loader": "0.5.4",
"nib": "1.1.2",
"node-sass": "^4.14.1",
"package.json": "2.0.1",
"postcss-loader": "2.0.6",
"pug": "^2.0.4",
"pug-html-loader": "1.1.5",
"pug-loader": "2.3.0",
"raw-loader": "0.5.1",
"resolve-url-loader": "2.1.0",
"rxjs": "6.6.7",
"sass-loader": "6.0.6",
"schema-utils": "0.3.0",
"stylus": "0.54.5",
"stylus-loader": "3.0.1",
"ts-loader": "2.2.2",
"tslint": "5.5.0",
"tslint-loader": "3.5.3",
"uglifyjs-webpack-plugin": "0.4.6",
"webpack": "3.12.0",
"webpack-dev-server": "2.11.2",
"webpack-merge": "4.1.0",
"zone.js": "~0.8.26"
},
"scripts": {
"start": "yarn run server:dev",
"compile": "webpack --config config/webpack.production.js --display-error-details",
"server:dev": "webpack-dev-server -d --config config/webpack.dev.js --content-base src/ --host 0.0.0.0 --port 9000",
"postinstall": "typings install"
}
}