I am getting tsconfig build issues, it cannot find Iterable, Iterator, Map, Set. Although, I am using es2015,es2018 lib, this does not solve the issue, tried various fixes, such as
npm install @types/node --save-dev npm install -g typescript@latest
Here are my package.json, tsconfig.json, tsconfig.base.json
tsconfig.json
{
"files": [
],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
]
}
tsconfig.base.json
{
"compilerOptions": {
"skipLibCheck": true,
"composite": false,
"esModuleInterop": true,
"baseUrl": "./",
"outDir": "./scripts/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"module": "es2020",
"allowSyntheticDefaultImports": true,
"lib": [
"es2018",
"ES2015.Iterable",
"dom"
]
},
}
tsconfig.app.json
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": [],
},
"files": [
"src/main.ts",
"src/polyfills.ts",
],
"include": [
"./src/**/*.d.ts",
],
}
package.json
{
"name": "spa",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.14",
"@angular/cdk": "^10.2.0",
"@angular/common": "~10.0.14",
"@angular/compiler": "~10.0.14",
"@angular/core": "~10.0.14",
"@angular/forms": "~10.0.14",
"@angular/localize": "~10.0.14",
"@angular/material": "~10.2.0-next.0-sha-25ce323fb",
"@angular/platform-browser": "~10.0.14",
"@angular/platform-browser-dynamic": "~10.0.14",
"@angular/router": "~10.0.14",
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"bootstrap": "^4.5.2",
"jquery": "^3.5.1",
"rxjs": "^6.6.3",
"tsd": "^0.13.1",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.8",
"@angular/cli": "~10.0.8",
"@angular/compiler-cli": "~10.0.14",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "^3.5.1",
"@types/node": "^12.12.67",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
}
}