Replies: 3 comments
-
I was able to eliminate this error by doing the following:
diff --git a/example1/tsconfig.app.json b/example1/tsconfig.app.json
index d739292..d158e31 100644
--- a/example1/tsconfig.app.json
+++ b/example1/tsconfig.app.json
@@ -21,7 +21,9 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
- "noFallthroughCasesInSwitch": true
+ "noFallthroughCasesInSwitch": true,
+
+ "types": ["@testing-library/jest-dom"]
},
"include": ["src"]
}
(venv) vite-js-dom-issue/example1 - [main●] » git diff tsconfig.node.json
diff --git a/example1/tsconfig.node.json b/example1/tsconfig.node.json
index 3afdd6e..3e1280e 100644
--- a/example1/tsconfig.node.json
+++ b/example1/tsconfig.node.json
@@ -7,7 +7,9 @@
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true,
- "noEmit": true
+ "noEmit": true,
+
+ "types": ["@testing-library/jest-dom"]
},
"include": ["vite.config.ts"]
} Is there a problem with the vite react-ts template, or |
Beta Was this translation helpful? Give feedback.
-
I can't replicate the issue. Vite doesn't rely on that library by default. Are there any projects / package.json / tsconfig.json beside or above the directoy of the Vite project? Maybe those are interfering it. |
Beta Was this translation helpful? Give feedback.
-
I've had a similar issue with another library. The solution, as presented here, was to add
This is based on the changed behavior in TypeScript 5.1.0. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I created a new vite project using the react-ts template,
and without modifying any files,
if I tried to build it, it would fail with errors:
Reproduction
https://github.com/rodrigc/vite-js-dom-issue
Steps to reproduce
pnpm create vite@latest example1 --template react-ts
cd example1
pnpm install
pnpm build
System Info
Used Package Manager
pnpm
Logs
Click to expand!
Validations
Beta Was this translation helpful? Give feedback.
All reactions