[Solved] VS Code Error: Vetur can‘t find ‘tsconfig.json‘ or ‘jsconfig.json‘

1. Cause

A new configuration file of vetur.config.js is added in vetur 0.31.0.
after this version, priority will be given to finding whether the project is equipped with tsconfig.json (TS project) or jsconfig.json (JS project).
if these two files are not found, go to vetur.config.js. If they are not found, this prompt will be thrown.

2. Explain

The JavaScript support of vscode can run in two different modes:
file range (without jsconfig.JSON)
in this mode, JavaScript files opened in vscode are regarded as independent units
as long as the file A.js does not explicitly reference the file b.ts (using// reference instructions or commonjs modules), there is no common project context between the two files.

3. Explicit project

(use jsconfig.JSON)

The JavaScript project is defined through the jsconfig.JSON file. The existence of such a file in the directory indicates that the directory is the root directory of the JavaScript project
the file itself can optionally list files belonging to the project, files to be excluded from the project, and compiler options (see below)
the JavaScript experience improves when you have a jsconfig.json file in your workspace that defines the project context
therefore, when you open a JavaScript file in a new workspace, we provide a prompt to create a jsconfig.json file.

4. Solution (1 out of 3)

4.1. Configure the vehicle plug-in and ignore the prompt </ H6>
 "vetur.ignoreProjectWarning": true,

4.2. Create jsconfig.json file in the project root directory </ H6>

Add code:

{
    "include": [
        "./src/*"
    ]
}
4.3. Create the vetur.config.js file in the project root directory </ H6>

Add code:

module.exports = {
    // vetur configuration, which will override the settings in vscode.  default: `{}`
    settings: {
        "vetur.useWorkspaceDependencies": true,
        "vetur.experimental.templateInterpolationService": true
    },
    // Normal projects use the default configuration default: `[{ root: './' }]`
}

Read More: