I have the following implementation in the app.module.ts
export class AppModule {
constructor(@Inject(ApmService) service: ApmService) {
setTimeout(()=> {
const apm = service.init({
active: environment.elasticApmActive,
environment: environment.production ? 'prod' : 'qa',
serviceName: environment.appName,
serverUrl: environment.elasticServerUrl
});
}, 1000)
}
}
And whenever my angular 13 application gets loaded, it shows me below error
My tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"downlevelIteration": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"lib": ["es6", "dom", "es2017", "es2019"],
"mapRoot": "./",
"module": "es2020",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es2015",
"strictPropertyInitialization": false,
"typeRoots": [
"../node_modules/@types"
],
"types": ["jasmine"],
"paths": {
"crypto": ["../node_modules/crypto-browserify","../node_modules/crypto-js"],
"stream": ["../node_modules/readable-stream"],
"zlib": ["../node_modules/browserify-zlib"],
"http": ["../node_modules/stream-http"],
"https": ["../node_modules/https-browserify"],
"assert": ["../node_modules/assert"],
"util": ["../node_modules/util"]
}
},
"files": [
"main.ts",
"polyfills.ts"
],
"include": [
"../node_modules/@careem/angular-react-adapter/src/ReactDirective.ts",
],
}
I have tried to change target:"es5" but still gives me the same error. Please help me try to find a solution to this.