'Angular Nx Nrwl - Cannot parse tsconfig.base.json: PropertyNameExpected in JSON when try to create a new lib

Im getting this error

Cannot parse tsconfig.base.json: PropertyNameExpected in JSON at position 891

when i run nx g @nrwl\angular:lib libName on CLI

my tsconfig.base.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "rootDir": ".",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es2015",
    "module": "esnext",
    "lib": ["es2017", "dom"],
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "baseUrl": ".",
    "paths": {
      "@admin-env/*": ["apps/admin/src/environments/*"],
      "@admin/*": ["apps/admin/src/app/*"],
      "@portal-env/*": ["apps/portal/src/environments/*"],
      "@portal/*": ["apps/portal/src/app/*"],
    }
  },
  "exclude": ["node_modules", "tmp"]
}

When i run i'm getting the error Cannot parse tsconfig.base.json: PropertyNameExpected in JSON at position 891.

The same happens when i try to run npx nx g @nrwl/angular:lib libName or nx g @nrwl/angular:lib

I'm usin VScode to write code, and there is no warning (lint) of error in tsconfig.base.json



Solution 1:[1]

Yes, that is exactly the solution - to remove comma: "paths": { "@sokar/products":["libs/products/src/index.ts"],<<-- } enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1