Может ли кто-нибудь помочь с проблемой ниже? Я застрял в этом на 3 дня. я весьма признателен
Много чего перепробовала, но вроде становится все хуже и хуже.
Я пытаюсь создать приложение angular с помощью ng build --prod, но получаю следующую ошибку:
Мои конфиги:
tsconfig.json
package.json
{
"compileOnSave": false,
"angularCompilerOptions": {
"disableTypeScriptVersionCheck": true
},
"compilerOptions": {
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom",
"ES2017.object"
]
}
}
Эта проблема возникает при сборке prod из-за несовместимых версий пакетов. Не всегда рекомендуется использовать последнюю доступную версию пакета, вам следует попробовать понизить версию пакета, чтобы решить эту проблему.
{
"name": "angular-ngrx-course",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config ./proxy.json",
"server": "ts-node -P ./server/server.tsconfig.json ./server/server.ts",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular-devkit/schematics": "^8.0.0",
"@angular/animations": "^8.0.2",
"@angular/cdk": "^8.0.0",
"@angular/common": "^8.0.2",
"@angular/compiler": "^8.0.2",
"@angular/core": "^8.0.2",
"@angular/forms": "^8.0.2",
"@angular/material": "^8.0.0",
"@angular/material-moment-adapter": "^8.0.0",
"@angular/platform-browser": "^8.0.2",
"@angular/platform-browser-dynamic": "^8.0.2",
"@angular/router": "^8.0.2",
"@ngrx/data": "^8.0.1",
"@ngrx/effects": "^8.0.1",
"@ngrx/entity": "^8.0.1",
"@ngrx/router-store": "^8.0.1",
"@ngrx/store": "^8.0.1",
"@ngrx/store-devtools": "^8.0.1",
"body-parser": "^1.18.2",
"core-js": "^2.4.1",
"express": "^4.16.2",
"hammerjs": "^2.0.8",
"moment": "^2.22.2",
"rxjs": "^6.3.3",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "^8.0.1",
"@angular/compiler-cli": "^8.0.2",
"@angular/language-service": "^8.0.2",
"@ngrx/schematics": "^8.0.1",
"@types/express": "^4.0.39",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^5.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "^4.1.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^6.0.0",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~3.4.5"
}
}