The value of ModuleResolution is set to Bundler by default while making a react+typescript app with vite it appears underlined red in vs code should i concerned ? is this a major error , i tried to do this a bunch of times and everytime i got the same error .. i.e if it's an error
4 Answers
I was also having this issue, even though Visual Studio Code was updated to the June 2023 release.
Turns out I had the same issue as Mun did above: the Microsoft Edge Tools for VSCode
extension was the culprit. Disabling that extension then reloading VSCode made the red squiggles go away.

- 111
- 2
- 5
-
3I have VSCode 1.80.1 and was still experiencing this issue. Solved by disabling the Edge Tools as stated above. – Eduardo Matsuoka Jul 26 '23 at 16:38
The problem is same as mine and I had done bunch of things but only when I update version for code Editor (vscode) the error had gone.
As the lastest typescript's version (5.x) which vite default template using just released in March 2023, that could lead old vscode show error when ModuleResolution is set to 'bundler'(only support from ts 5.x). So if you're using vscode, check your version and be sure it is at least 1.77
Hope this can help you

- 69
- 3
-
1just for reference, May 06 2023, VSCode 1.78 and still can't resolve JSX.Attributes still has the bug, neither "bundler" – ncubica May 07 '23 at 06:08
-
2@ncubica Had the same problem when using VSCode 1.78.2 but found the issue was actually being caused by the "Microsoft Edge Tools for VS Code" extension, which I think has an older version of the schema for TSConfig. Disabling this extension resolved the issue with VSCode showing the "bundler" value as an error for the "moduleResolution" setting. – Mun Jun 07 '23 at 01:58
The bundler module resolution is a new feature only work on Typescript 5.x.
Print the typescipt compiler's version in terminal.
tsc -v
If the major version number is less than 5, you should update typescript with the following command and restart VSCode.
npm update typescript -g
or
npm install typescript@latest -g

- 31
- 2
It was due to "webhint" extension in my case, you can disable this extension in your vscode extension control panel.

- 1
-
1Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 28 '23 at 07:00