denoland / denoland/react-vite-ts-template
deno check fails with Cannot find module npm:react
- Dominant language
- TypeScript
- Stars
- 37
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Deno v2.2.5
Windows 11
Currently trying to run the test will throw this error.
```sh
deno test -A
TS2307 [ERROR]: Cannot find module 'npm:/react-dom@18.3.1'.
TS2307 [ERROR]: Cannot find module 'npm:/react@18.3.1'.
Found 2 errors.
error: Type checking failed.
Stack backtrace:
0: node_api_get_module_file_name
1: node_api_get_module_file_name
2: uv_mutex_destroy
3: uv_mutex_destroy
4: uv_mutex_destroy
5: uv_mutex_destroy
6: uv_mutex_destroy
7: uv_mutex_destroy
8: uv_mutex_destroy
9: uv_mutex_destroy
10: uv_mutex_destroy
11: simdutf::get_active_implementation
12: BaseThreadInitThunk
13: RtlUserThreadStart
```
Digging in it seems that specifying react, react-dom types in the compiler options causes this error.
```ts
"compilerOptions": {
"types": [
"react",
"react-dom",
"@types/react"
],
```
Removing the types here fixes the issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.