【问题标题】:Angular App insight error: 'rootDir' is expected to contain all source files.tsAngular App 洞察错误:'rootDir' 应包含所有源 files.ts
【发布时间】:2020-11-29 15:08:46
【问题描述】:

我正在尝试使用 link 在我的 angular 10 应用中包含应用洞察:

我在节点模块中遇到异常:@microsoft/applicationinsights-web tsconfig.json 文件:

文件 'c:/MyApp/UI/node_modules/@microsoft/applicationinsights-web/src/Init.ts' 不在 'rootDir' 下 'c:/MyApp/UI/node_modules/@microsoft/applicationinsights-web/AISKU/src'。 'rootDir' 应包含所有源文件。ts

现在的问题是 AISKU 文件夹不存在:

c:/MyApp/UI/node_modules/@microsoft/applicationinsights-web/AISKU

【问题讨论】:

    标签: angular appinsights


    【解决方案1】:
    1. 在 package1 的 tsconfig.json 中设置引用

      { “编译器选项”:{ "declarationDir": "dist", “rootDir”:“src” }, “包括”:[“src”], “参考”: [ { “路径”:“../package2” } ] }

    2. 在 package2 的 tsconfig.json 中设置组合

      “编译器选项”:{ "declarationDir": "dist", "rootDir": "src", “复合”:真 }

    【讨论】:

      猜你喜欢
      • 2019-12-16
      • 2021-09-16
      • 2019-01-21
      • 2018-12-06
      • 2019-04-12
      • 1970-01-01
      • 2020-07-10
      • 1970-01-01
      • 2018-06-19
      相关资源
      最近更新 更多