找不到“vite/client”的类型定义文件?
请问一下,tsConfig中报这个错误,应该如何解决?
找不到“vite/client”的类型定义文件,程序包含该文件是因为: 在 compilerOptions 中指定的类型库 "vite/client" 的入口点。
安装版本:"typescript": "^4.9.5", "vite": "^4.4.9"。
tsConfig: {
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"strictFunctionTypes": false,
"jsx": "preserve",
"baseUrl": ".",
"allowJs": true,
"sourceMap": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"experimentalDecorators": true,
"lib": [
"dom",
"esnext"
],
"types": [
"vite/client",
"jest"
],
"typeRoots": [
"./node_modules/@types/",
"./types"
],
"noImplicitAny": false,
"skipLibCheck": true,
"paths": {
"/@/*": [
"src/*"
],
"/#/*": [
"types/*"
],
"@/*": [
"src/*"
],
"#/*": [
"types/*"
]
}
},
"include": [
"tests/**/*.ts",
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"types/**/*.d.ts",
"types/**/*.ts",
"build/**/*.ts",
"build/**/*.d.ts",
"mock/**/*.ts",
"vite.config.ts"
],
"exclude": [
"node_modules",
"tests/server/**/*.ts",
"dist",
"**/*.js"
]
}
以上是 找不到“vite/client”的类型定义文件? 的全部内容, 来源链接: utcz.com/p/935135.html