1

I have updated my angular library project to angular 14 and while and building my app I am getting following Error

Command

ng build --base-href /home/ --configuration production

ERROR:

/node_modules/@rcis/common/fesm2020/rcis-common.mjs:2000:39-51 - Error: export 'catchError' (imported as 'catchError$1') was not found in 'rxjs' 

and when I change the target in tsconfig.json from ES2020 to ES2015 it works fine.

tsconfig.json code -

     {
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "downlevelIteration": true,
    "importHelpers": true,
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "esnext",
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "target": "ES2020", //if I change ES2015 it works fine
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ]
  }
}

What I need to make the change in order to work catchError with ES2020 in angular 14. Any help will be highly appreciated.

vikrant
  • 11
  • 3

0 Answers0