我正在尝试使NativeScript应用将日志写入Azure AppInsight。我正在使用npm软件包“ @ microsoft / applicationinsights-web”(2.5.8)。
在应用程序启动时,尝试调用new ApplicationInsights()
时出现此错误:
System.err: TypeError: Cannot assign to read only property '__extends' of object '[object global]'
System.err: File: (file: node_modules\@microsoft\applicationinsights-shims\dist-esm\applicationinsights-shims.js:96:0)
System.err:
System.err: StackTrace:
System.err: (file: node_modules\@microsoft\applicationinsights-shims\dist-esm\applicationinsights-shims.js:96:0)
System.err: at (file: node_modules\@microsoft\applicationinsights-shims\dist-esm\applicationinsights-shims.js:97:1)
System.err: at ../node_modules/@microsoft/applicationinsights-shims/dist-esm/applicationinsights-shims.js(file:///data/data/com.mycompany.live/files/app/vendor.js:95073:30)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/@microsoft/applicationinsights-web/dist-esm/applicationinsights-web.js(file: node_modules\@microsoft\applicationinsights-web\dist-esm\applicationinsights-web.js:1:0)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/shared/tracking.service.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:1681:92)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/shared/default-error-handler.service.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:1316:75)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/shared/index.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:1351:88)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/app.module.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:214:66)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/com.mycompany.live/files/app/bundle.js:2027:73)
System.err: at ./main.ts(file:///data/data/com.mycompany.live/files/app/bundle.js:2095:30)
System.err: at __webpack_require__(file: src\webpack\bootstrap:753:0)
System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0)
System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0)
System.err: at (file:///data/data/com.mycompany.live/files/app/bundle.js:2:57)
System.err: at require(:1:266)
我想知道是否有人已经找到了解决此问题的方法。