打包时执行 "vue-tsc && vite build" 报错:
error TS2688: Cannot find type definition file for ''. The file is in the program because: Entry point for implicit type library ''
依赖版本如下:
"dependencies": { "@vueuse/core": "^10.5.0", "ant-design-vue": "4.x", "pinia": "^2.1.6", "sass": "^1.69.2", "vue": "^3.3.4", "vue-router": "^4.2.5" }, "devDependencies": { "@types/node": "^20.10.0", "@typescript-eslint/eslint-plugin": "^6.7.5", "@typescript-eslint/parser": "^6.7.5", "@vitejs/plugin-vue": "^4.5.0", "eslint": "^8.51.0", "eslint-plugin-vue": "^9.17.0", "postcss-syntax": "^0.36.2", "typescript": "^5.4.2", "unplugin-vue-components": "^0.25.2", "vite": "^4.5.0", "vue-tsc": "^1.8.5" }
tsconfig.json
{ "compilerOptions": { "baseUrl": "./", "typeRoots": [ "node_modules/@types", // 默认值 "types" ], "paths": { "@/*": [ "src/*" ], "#/*": [ "types/*" ] }, "target": "ES2020", "useDefineForClassFields": true, "module": "ESNext", "lib": [ "ES2020", "DOM", "DOM.Iterable" ], "skipLibCheck": true, /* Bundler mode */ "moduleResolution": "Node", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "preserve", /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, "include": [ "src/**/*.ts", "types/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue" ], "exclude": [ "node_modules", "dist", "**/*.js" ], "references": [ { "path": "./tsconfig.node.json" } ]}
因为不知道''(就是'')到底是什么,不知道从何入手,重新拉取了typescript也不行
把错误处的代码也贴出来
vue3、vite项目本地运行正常,打包报一堆错,应该是type-check的报错,应该怎么解决? 无
vue3+vite打包的时候,报错Access is denied,请问怎么解决啊?重新装了node_modules包,用nvm试了npm的几个版本都不行
webpack5 打包时候会报几个这种问题,怎么解决
在vue3和pinia使用ts type+sId+zId 三个都会报 “property type does not exist on object” 新补充 v1,v2...是接口返回来的,自己重新定义了新key,v1写在IUserState了没有报错,其他都飘红
vue 项目打包报错? 应该怎么调整? package.json
创建的测试证书打包打包报错怎么解决呢?