❗ 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:
时间: 2023-07-31 09:03:58 浏览: 396
根据提示信息,你需要在`jsconfig.json`或者`tsconfig.json`文件中指定正确的目标版本。以下是两个文件的示例配置:
For jsconfig.json:
```
{
"compilerOptions": {
"target": "es5"
},
"exclude": ["node_modules"]
}
```
For tsconfig.json:
```
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"strict": true
},
"exclude": ["node_modules"]
}
```
请注意,这里的目标版本需要与你的Vue版本相对应。在你的示例中,Vue版本为2.7.14,因此目标版本应该设置为`"es5"`。如果你使用的是其他版本的Vue,需要根据实际情况进行调整。
相关问题
❗ 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.
阅读全文