使用 agm-spiderfier 构建 Angular 应用程序时出错

Error while building Angular app with agm-spiderfier

  1. 我在使用 AGM Spidefier 库编译代码时遇到错误 TypeScript 编译中缺少 \node_modules\agm-spiderfier\index.ts。请通过 'files' 或 'include' 属性.

    确保它在您的 tsconfig 中
  2. 下面是我的tsconfig.app.json和tsconfig.spec.json

tsconfig.app.json

      {
         "extends": "./tsconfig.base.json",
         "compilerOptions": {
          "outDir": "./out-tsc/app",
           "types": []
        },
      "files": [
        "src/main.ts",
        "src/polyfills.ts"
      ],
      "include": [
        "src/**/*.d.ts",
        "../node_modules/agm-spiderfier/*.ts"
      ]
    }

tsconfig.spec.json

    {
      "extends": "./tsconfig.base.json",
      "compilerOptions": {
        "outDir": "./out-tsc/spec",
        "types": [
          "jasmine",
          "googlemaps"  
        ]
      },
      "files": [
        "src/test.ts",
        "src/polyfills.ts",
        "../node_modules/agm-spiderfier/index.ts",    
      ],
      "include": [
        "src/**/*.spec.ts",
        "src/**/*.d.ts",
        "../node_modules/agm-spiderfier/*.ts"
      ]
    }
    Please modify your both the files as below.
    
    tsconfig.app.json
    
    "include": [
        "src/**/*.d.ts",
        "node_modules/agm-spiderfier/**/*.ts"
      ]
    

tsconfig.spec.json
    
     "include": [
        "src/**/*.spec.ts",
        "src/**/*.d.ts",
        "node_modules/agm-spiderfier/**/*.ts"
      ]