-
-
Notifications
You must be signed in to change notification settings - Fork 465
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Vue - Official extension or vue-tsc version
3.0.2
VSCode version
1.102.1
Vue version
3.5.17
TypeScript version
未使用TypeScript
System Info
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 Intel(R) Core(TM) i5-14400
Memory: 6.68 GB / 15.79 GB
Binaries:
Node: 22.16.0 - C:\nvm4w\nodejs\node.EXE
npm: 10.9.2 - C:\nvm4w\nodejs\npm.CMD
Browsers:
Edge: Chromium (129.0.2792.65)
Internet Explorer: 11.0.19041.4355
Framework:
uni-app: 4.75
Vue: 3.x
Platform: mp-weixin, mp-toutiao, web
Project Info:
App Name: wallpaper-engine
App Version: 1.0.0
Vue Version: 3 (Composition API)
uni-app Compile Version: 4.75
uni-app Runtime Version: 4.75
Target Platforms: 微信小程序, 抖音小程序
Environment:
IDE: VS Code
Node Version Manager: nvm4w
Package Manager: npm 10.9.2
package.json dependencies
## Dependencies
此项目使用 HBuilderX 创建,没有 `package.json` 文件。项目依赖通过 HBuilderX 内置管理。但代码编写仍在vscode中完成
### 项目信息
- **创建方式**: HBuilderX 可视化界面创建
- **项目类型**: uni-app (Vue 3)
- **uni-app 版本**: 4.75
- **Vue 版本**: 3.x (Composition API)
- **构建工具**: HBuilderX 内置编译器
### 使用的 uni-ui 组件
- `uni-tag` - 标签组件
- `uni-dateformat` - 日期格式化组件
- `uni-icons` - 图标组件
- `uni-load-more` - 加载更多组件
- `uni-popup` - 弹窗组件
### 目标平台
- 微信小程序 (mp-weixin)
- 抖音小程序 (mp-toutiao)
- H5/Web
### 开发环境
- **IDE**: HBuilderX + VS Code
- **Node.js**: 22.16.0 (via nvm4w)
- **npm**: 10.9.2
- **操作系统**: Windows 10
### 样式预处理器
- **SCSS**: 项目中使用 `lang="scss"` 进行样式编写
**注意**: 由于项目使用 HBuilderX 创建,依赖项由 HBuilderX 自动管理,无需手动维护 package.json 文件。
Steps to reproduce
github代码仓库 https://github.com/Ciallo-Chiaki/uni-app-wallpaper-engine.git
项目在 3.0.1
版本中没有报错信息,但在更新为 3.0.2
后使用 HBuilderX
创建的 uni-app
项目在打开项目中 .vue
文件时出现以下错误:
Write global types file failed. Please ensure that "node_modules" exists and "vue" is a direct dependency, or set "vueCompilerOptions.globalTypesPath" in "tsconfig.json" manually.vue(404)
What is expected?
可以正常识别vue文件中的template标签
What is actually happening?
错误表现
- VS Code 中出现持续的类型错误提示
- 在任何
.vue
文件中都会显示红色波浪线 - 错误消息:
Write global types file failed. Please ensure that "node_modules" exists and "vue" is a direct dependency, or set "vueCompilerOptions.globalTypesPath" in "tsconfig.json" manually.vue(404)
- 在任何


项目运行状态
- 重要: 尽管有这些错误提示,项目在以下环境中仍然正常运行:
- 项目并未使用TypeStript
- HBuilderX 编译正常
- 微信开发者工具运行正常
- 浏览器预览正常
- 错误仅存在于 VS Code 的类型检查层面
错误时机
- 错误在更新3.0.2后立即出现
- 之前相同的代码在旧版本3.0.1中工作正常
- 项目代码本身没有任何变更
Link to minimal reproduction
https://github.com/Ciallo-Chiaki/bug-minimal-reproduction.git
Any additional comments?
该错误在更新前不存在,且在回退3.0.1版本时解决。此项目并没有使用ts,而在其他使用了 electron+vite
的ts项目中,3.0.2
版本并未出现此报错
arielnoname
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested