❗ 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/ivue/node_modules/vue/package.json tsconfig: file:///Users/shenglei/Downloads/Vue/ivue/jsconfig.json vueCompilerOptions: { "extensions": [ ".vue" ] } Have any questions about the report message? You can see how it is composed by inspecting the source code.
时间: 2024-01-03 16:03:14 浏览: 134
根据你提供的错误信息,可以看出是 Vue 和 TypeScript 的版本不匹配导致的错误。解决这个问题,你需要将 TypeScript 的目标版本修改为 2.7,与你使用的 Vue 版本匹配。可以按照以下步骤进行修改:
1. 打开项目根目录下的 `tsconfig.json` 文件,如果没有,可以在项目根目录下创建这个文件。
2. 在 `compilerOptions` 选项中添加 `target` 属性,并将其设置为 2.7,例如:
```
"compilerOptions": {
"target": "2.7",
...
}
```
3. 保存文件,重新启动项目。
这样应该就能够解决你遇到的版本不匹配的问题了。如果还有其他问题,请联系我,我会尽力帮助你。
相关问题
❗ Incorrect Target Target version mismatch. You can specify the target version in vueCompilerOptions.target in tsconfig.json / jsconfig.json. (Expected "target": 2.7)
It seems like you are encountering a target version mismatch error in your Vue project. This error message is suggesting that the expected target version is 2.7, but your tsconfig.json or jsconfig.json file has a different target version specified. To fix this error, you can add the vueCompilerOptions object to your tsconfig.json or jsconfig.json file and specify the target version as 2.7. Here's an example configuration:
```
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
...
},
"vueCompilerOptions": {
"target": "2.7"
}
}
```
Once you've added this configuration to your tsconfig.json or jsconfig.json file, you should be able to compile your Vue project without encountering the target version mismatch error.
阅读全文
相关推荐










