1

I updated an Angular 8 project first to Angular 9 then Angular 10. After successfully updating to 10 and running ng serve to make sure the application still correctly works I followed the nativescript migration steps here.

When getting to the step where I add @nativescript/schematics I get the following error "File tsconfig.json could not be parsed!".

I saw this stackoverflow question and plugged my tsconfig.json into the compiler and still couldn't figure out what was causing the error. All brackets seem to be closed directly.

Any help on this is greatly appreciated! Below is the code in my tsconfig.json:

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "module": "esnext",
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ],
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true
  }
}

1 Answer 1

3

Ended up being the , after the single "lib" array. Was solely a JSON issue and not anything with the angular / nativescript migration.

Hope this helps someone else that ran into this simple but goofy error. cheers!

Sign up to request clarification or add additional context in comments.

2 Comments

Just FYI, the trailing comma is legal JS but not valid JSON.
This was the solution to the problem I had, thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.