TS1086: An accessor cannot be declared in ambient context

前端 未结 12 1544
自闭症患者
自闭症患者 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:33

    I had this error when i deleted several components while the server was on(after running the ng serve command). Although i deleted the references from the routes component and module, it didnt solve the problem. Then i followed these steps:

    1. Ended the server
    2. Restored those files
    3. Ran the ng serve command (at this point it solved the error)
    4. Ended the server
    5. Deleted the components which previously led to the error
    6. Ran the ng serve command (At this point no error as well).

提交回复
热议问题