❗ 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 20:03:14 浏览: 120
根据你提供的错误信息,可以看出是 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 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 a different version.
To fix this issue, you can do the following:
1. Open the tsconfig.json/jsconfig.json file in your project.
2. Add a "vueCompilerOptions" object if it doesn't exist already.
3. Inside the "vueCompilerOptions" object, add a "target" property and set it to "es2018" or any other version that matches the expected target version (2.7 in this case).
Here's an example of what the updated tsconfig.json/jsconfig.json file might look like:
```
{
"compilerOptions": {
// your existing compiler options
},
"vueCompilerOptions": {
"target": "es2018"
}
}
```
Once you've made these changes, try running your application again to see if the issue has been resolved.
阅读全文