Currently, I am developing a single-page HTML application using TypeScript in VSCode.
Initially, the app was running smoothly without any errors or warnings. However, I decided to incorporate Azure Application Insight into the project.
To integrate it, I used the command: npm install --save @microsoft/applicationinsights-web
After installation, new folders named applicationinsights were created under node_modules and @types\applicationinsights, along with several "applicationinsights-*-js" folders under node_modules@microsoft.
Prior to adding any code related to Azure Application Insight, I imported { ApplicationInsights } from "@microsoft/applicationinsights-web".
Following this step, while tsc did not display any errors, the Problems tab in VSCode presented 121 errors, particularly indicating that my main objects were no longer recognized, causing the app to fail to start.
In an attempt to resolve this issue, I made changes to the tsconfig.json file by setting "target": "ES2022", "module": "ES6", and "moduleResolution": "node". Unfortunately, this adjustment did not solve the problem.
I would greatly appreciate it if someone could assist me in understanding the root of this issue.