-1

I have updated angular v10 to v13. Migration is completed without any error but while I'm trying to run ng serve command, I'm getting this compile time error.

tsconfig.ts:

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "noUnusedLocals": true,    
    "importHelpers": true,
    "resolveJsonModule": true,
    "target": "es5",    
    "newLine": "LF",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2019",
      "dom",
      "esnext.asynciterable"
    ],
    "paths": {
      "@angular/*": ["node_modules/@angular/*"],
      "rxjs": ["node_modules/rxjs", "node_modules/rxjs"]
    },
    "baseUrl": "./"
  }
}

Error: Left side of comma operator is unused and has no side effects. if (!(0, fs_1.existsSync)(startPath)) {

I tried to make changed in tsconfig by replacing es5 to es6 and es2016 but that dind't work for me. If anyone knows how to resolve this error, that will be helpful for me.

1 Answers1

0

This is a typescript issue, fixed by this PR. The PR is merged in typescript v5.1.5.

According to Angular version compatibility, you have to upgrade to Angular v16.1.x in order to be able to use typescript >= v5.1.5

Ricky Mo
  • 6,285
  • 1
  • 14
  • 30