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 definition file for 'vue-cesium/Cesium.d.ts'. #1

Open
nodepade opened this issue Nov 26, 2022 · 2 comments
Open

Cannot find type definition file for 'vue-cesium/Cesium.d.ts'. #1

nodepade opened this issue Nov 26, 2022 · 2 comments

Comments

@nodepade
Copy link

运行 npm run build

报错如下:

error TS2688: Cannot find type definition file for 'vue-cesium/Cesium.d.ts'.
The file is in the program because:
Entry point of type library 'vue-cesium/Cesium.d.ts' specified in compilerOptions

tsconfig.json:25:7
25 "vue-cesium/Cesium.d.ts",
~~~~~~~~~~~~~~~~~~~~~~~~
File is entry point of type library specified here.

error TS2688: Cannot find type definition file for 'vue-cesium/global.d.ts'.
The file is in the program because:
Entry point of type library 'vue-cesium/global.d.ts' specified in compilerOptions

tsconfig.json:24:7
24 "vue-cesium/global.d.ts",
~~~~~~~~~~~~~~~~~~~~~~~~
File is entry point of type library specified here.

tsconfig.js 文件内容:
{
"compilerOptions": {
"strict": true,
"module": "ESNEXT",
"target": "ESNEXT",
"noImplicitAny": false,
"declaration": true,
"moduleResolution": "Node",
"esModuleInterop": true,
"jsx": "preserve",
"sourceMap": true,
"lib": [
"ESNEXT",
"DOM",
"DOM.Iterable"
],
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strictNullChecks": false,
"baseUrl": "./",
"types": [
"vue-cesium/global.d.ts",
"vue-cesium/Cesium.d.ts",
"vite/client"
],
"paths": {
"@src/": [
"src/
"
],
"vue$": [
"node_modules/vue/dist/vue.runtime.esm-bundler.js"
]
}
},
"include": [
"src/**/",
"typings/
",
"node_modules/vue-cesium/Cesium.d.ts",
"node_modules/vue-cesium/global.d.ts"
]
}

@zouyaoji
Copy link
Owner

请升级vue-cesium到最新版,再用 pnpm 安装试试。
如果不行的话等我有空了再弄弄,请先参考 https://github.com/zouyaoji/vue-cesium-demo 项目的配置。

@JieKuiGiser
Copy link

请升级vue-cesium到最新版本,再用pnpm安装尝试。 如果不行的话等我有空了再弄弄,请先参考https://github.com/zouyaoji/vue-cesium-demo项目的配置。
大神请问此问题解决了么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants