【问题标题】:Tsconfig error when installing Quasar testing extension with TypeScript option使用 TypeScript 选项安装 Quasar 测试扩展时出现 Tsconfig 错误
【发布时间】:2021-03-29 04:24:46
【问题描述】:

使用 TypeScript 选项安装测试扩展时出现错误。

我试过@quasar/testing-unit-jest 和@quasar/testing 在这两个结果中我都得到一个错误:

UnhandledPromiseRejectionWarning: SyntaxError: /Volumes/Work/cnd05/services/app/tsconfig.json: Unexpected token } in JSON at position 305

我的 tsconfig 是:

{
"extends": "@quasar/app/tsconfig-preset",
"compilerOptions": {
    "baseUrl": ".",
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": false,
    "esModuleInterop": true,
    "removeComments": true,
    "allowJs": true,
    "types": [
      "quasar"
    ]
  },
}

UPD:当我尝试在没有 TypeScript 支持的情况下安装它时,一切都很好。创建带有示例的测试文件夹,依此类推。但是在我遇到该错误后没有测试文件夹。

【问题讨论】:

    标签: typescript jestjs quasar-framework quasar


    【解决方案1】:

    我的错。我错过了tsconfig.json 中的尾随逗号,这是 JSON 语法所不允许的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-08
      • 2015-12-31
      • 2020-03-04
      • 2014-01-11
      • 1970-01-01
      • 2017-09-05
      • 2020-04-25
      • 1970-01-01
      相关资源
      最近更新 更多