App.vue Doctor ❗ Incorrect Target Target version mismatch. You can specify the target version in vueCompilerOptions.target in tsconfig.json / jsconfig.json. (Expected "target": 2.7) vue version: 2.7.14 tsconfig target: 3 (default) vue: /Users/shenglei/Downloads/vue/myvue1/node_modules/vue/package.json tsconfig: file:///Users/shenglei/Downloads/vue/myvue1/jsconfig.json vueCompilerOptions: { "extensions": [ ".vue" ] }
时间: 2023-12-03 07:04:44 浏览: 30
这个错误是由于你的 TypeScript 编译器的目标版本和 Vue 的版本不匹配所导致的。你可以在项目的 `tsconfig.json` 或 `jsconfig.json` 文件中指定编译器的目标版本。在 `vueCompilerOptions` 对象中添加一个 `target` 属性并将其值设置为 `2.7` 即可解决这个问题。
例如:
```json
{
"compilerOptions": {
"target": "esnext"
},
"vueCompilerOptions": {
"target": 2.7,
"extensions": [".vue"]
}
}
```
在这个例子中,我们将 `target` 属性设置为了 `2.7`,以匹配 Vue 的版本。同时,我们也保留了 TypeScript 编译器的默认目标版本 `esnext`。
相关问题
App.vue Doctor ❗ Incorrect Target Target version mismatch. You can specify the target version in vueCompilerOptions.target in tsconfig.json / jsconfig.json. (Expected "target": 2.7) vue version: 2.7.14 tsconfig target: 3 (default) vue: /Users/shenglei/Downloads/🌏/vuet9/node_modules/vue/package.json tsconfig: file:///Users/shenglei/Downloads/%F0%9F%8C%8F/vuet9/jsconfig.json vueCompilerOptions:
It seems that there is a version mismatch between the target version specified in the tsconfig.json/jsconfig.json and the expected target version in the vueCompilerOptions.target. The error message suggests that the expected target version is 2.7, while the tsconfig target is set to 3 (default).
To fix this issue, you can specify the target version in the vueCompilerOptions.target in tsconfig.json/jsconfig.json to match the expected target version. For example, you can set the target version to 2.7 in the tsconfig.json/jsconfig.json file by adding the following line:
```
"compilerOptions": {
"target": "es2016"
},
```
Make sure to replace "es2016" with the appropriate target version for your project.
Once you have made this change, try running the application again to see if the issue has been resolved.