TS1086: An accessor cannot be declared in ambient context

前端 未结 12 1756
自闭症患者
自闭症患者 2021-02-01 12:16

I have a thousands of this error after initial implementation nad typing in terminal ng serve my-app of and i can\'t resolve it. This is first time for me when i have problem li

12条回答
  •  野性不改
    2021-02-01 12:29

    Quick solution: Update package.json

    "devDependencies": {
       ...
       "typescript": "~3.7.4",
     }
    

    In tsconfig.json

    {
        ...,
        "angularCompilerOptions": {
           ...,
           "disableTypeScriptVersionCheck": true
        }
    }
    

    then remove node_modules folder and reinstall with

    npm install

    For more visit here

提交回复
热议问题