Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

579
Visualizações
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

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I got this error when there was a comma ',' at the end of the paths list.

"@portal/*": ["apps/portal/src/app/*"],  <<< REMOVE this comma
over 4 years ago · Santiago Trujillo Relatório

0

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

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda