I have updated my Angular11 project to Angular12, but getting errors like below:-
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
And also many errors from node_modules/typescript/lib file.
I have updated all the dependencies and also updated my tsconfig.json file.
But It seems that the configuration from my tsconfig.json file is not getting picked up (Because I have set "experimentalDecorators": true)
Note: I have nested folder structure and my tsconfig folder resides in inner section parallel to innser src(folder)
Here below is my package.json file.
{
"name": "ota-dashboard",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --base-href=/main/ --proxy-config proxy.conf.json --port=4201",
"build": "ng build --configuration production --base-href=/main/",
"test": "ng test --code-coverage",
"lint": "ng lint",
"e2e": "ng e2e",
"ng-build-all": "ng build otalib && ng build"
},
"private": true,
"dependencies": {
"@angular-material-components/datetime-picker": "^6.0.3",
"@angular/animations": "^12.2.17",
"@angular/cdk": "^12.2.13",
"@angular/common": "~12.2.17",
"@angular/compiler": "~12.2.17",
"@angular/core": "~12.2.17",
"@angular/forms": "~12.2.17",
"@angular/localize": "^12.2.17",
"@angular/material": "^12.2.13",
"@angular/platform-browser": "~12.2.17",
"@angular/platform-browser-dynamic": "~12.2.17",
"@angular/router": "~12.2.17",
"@ngx-formly/bootstrap": "^5.0.0",
"@ngx-formly/core": "^5.0.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"ajv": "^6.10.0",
"angular2-query-builder": "^0.6.2",
"bootstrap": "^4.5.2",
"chart.js": "^2.9.4",
"classlist.js": "1.1.20150312",
"core-js": "^3.8.1",
"file-saver": "^2.0.5",
"material-icons": "^0.3.1",
"ng2-charts": "^2.4.2",
"ngx-guided-tour": "^1.1.11",
"ngx-spinner": "^12.0.0",
"rxjs": "~6.6.0",
"spark-md5": "^3.0.2",
"tslib": "^2.3.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^12.1.3",
"@angular-devkit/build-angular": "~12.2.18",
"@angular/cli": "~12.2.18",
"@angular/compiler-cli": "~12.2.17",
"@ngx-formly/schematics": "^5.10.22",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"compression-webpack-plugin": "^6.0.5",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~6.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"ng-packagr": "^12.2.7",
"protractor": "~7.0.0",
"puppeteer": "^10.4.0",
"ts-node": "~8.3.0",
"typescript": "~4.2.4",
"webpack-merge": "^5.8.0"
}
}
Here below is my tsconfig.json file
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowJs": true,
"importHelpers": true,
"target": "es5",
"module": "esnext",
"types": ["node"],
"skipLibCheck": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
],
"paths": {
"otalib": [
"dist/otalib/otalib",
"dist/otalib"
],
"core-js/es6/": [
"./node_modules/core-js/es/"
],
"*": [
"*",
"generated/*"
]
}
},
"include": [
"./src/**/*",
"./src/**/*.d.ts"
],
"exclude": [
"./node_modules",
"./node_modules/typescript/lib/lib.dom.d.ts",
"./node_modules/typescript/lib/lib.webworker.d.ts"
]
}
I have set
"experimentalDecorators": true,
"allowJs": true,
in my tsconfig.json file to get rid of Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning. but it's not working.
I am also attaching a screenshot of my folder structure and errors.