【问题标题】:Vetur error with finding tsconfig.json or jsconfig.json查找 tsconfig.json 或 jsconfig.json 时出现 Vetur 错误
【发布时间】:2021-07-04 04:26:53
【问题描述】:

我在为我的项目创建新的 vue 页面时不断出错。错误是说:

Vetur 在 /xxxx/xxxxxx 中找不到 tsconfig.jsonjsconfig.json

解决这个问题的方法是什么?

【问题讨论】:

    标签: vue.js tsconfig


    【解决方案1】:

    创建文件:)

    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"
      }
    }
    

    【讨论】:

    • 我是添加在vue文件夹还是package.json文件中?
    • @JohnwasHere 将文件添加到项目的根目录,与package.json相同的文件夹:)
    • 是添加到文件夹中的文件本身还是添加到 package.json 文件中的代码块?
    • @JohnwasHere 在您的项目目录中创建一个名为 tsconfig.json 的新文件并粘贴答案中的内容。
    • package.json 呢,里面应该是什么?
    猜你喜欢
    • 2021-06-26
    • 2021-03-31
    • 1970-01-01
    • 1970-01-01
    • 2020-11-30
    • 1970-01-01
    • 2019-02-10
    • 2021-09-11
    • 1970-01-01
    相关资源
    最近更新 更多