[Solved] error TS1086: An accessor cannot be declared in an ambient context

error TS1086: An accessor cannot be declared in an ambient context

Error ts1086 error resolution

After the NPM package is installed, an error is reported when running the project.

The error information is as follows

ERROR in node_modules/xxx/xxx/xxxx.d.ts(15,9): error TS1086: An accessor cannot be declared in an ambient context.

Solution:

Modify tsconfig.json file

{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

Read More: