Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find type declaration file in TypeScript #1

Closed
condorheroblog opened this issue Oct 17, 2023 · 1 comment
Closed

Cannot find type declaration file in TypeScript #1

condorheroblog opened this issue Oct 17, 2023 · 1 comment
Labels
good first issue Good for newcomers question Further information is requested

Comments

@condorheroblog
Copy link
Owner

// Cannot find module 'vite-plugin-fake-server' or its corresponding type declarations
import { vitePluginFakeServer } from "vite-plugin-fake-server";

// Cannot find module 'vite-plugin-fake-server/client' or its corresponding type declarations
import { defineFakeRoute } from "vite-plugin-fake-server/client";

my tsconfig.json:

{
	"compilerOptions": {
		"target": "ESNext",
		"allowJs": true,
		"skipLibCheck": true,
		"esModuleInterop": true,
		"allowSyntheticDefaultImports": true,
		"strict": true,
		"forceConsistentCasingInFileNames": true,
		"noFallthroughCasesInSwitch": true,
		"module": "ESNext",
		"moduleResolution": "node",
		"resolveJsonModule": true,
		"isolatedModules": true,
		"noEmit": true,
		"jsx": "react-jsx"
	}
}
@condorheroblog
Copy link
Owner Author

https://arethetypeswrong.github.io/?p=vite-plugin-fake-server%400.0.2

After type checking, it was found that Node10 is not supported. Replace it with another value

"moduleResolution": "bundler",

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant