Vetur error with finding tsconfig.json or jsconfig.json
Asked Answered
E

1

7

I keep getting an error with making new vue pages for my project. The error is saying:

Vetur can't find tsconfig.json or jsconfig.json in /xxxx/xxxxxx.

What would be the solution to fix this problem?

Externality answered 8/4, 2021 at 10:0 Comment(0)
T
6

To create the file :)

See the docs

// tsconfig.json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    // this enables stricter inference for data properties on `this`
    "strict": true,
    "jsx": "preserve",
    "moduleResolution": "node"
  }
}
Turner answered 8/4, 2021 at 10:2 Comment(6)
Do I add it In the vue folder or in the package.json file?Externality
@Externality Add the file to the root of the project, same folder as package.json :)Turner
is it a file by itself added to the folder or a code chunk added to package.json file?Externality
@Externality Cerate a new file in your project directory called tsconfig.json and paste the content from the answer.Turner
What about package.json, what should be inside of it?Scincoid
I'm unhappy that vue create does not provide this file automatically. That being said, I'm not familiar with how they (Vetur and vue-cli) work.Vidal

© 2022 - 2024 — McMap. All rights reserved.