Reflect.metadata is not a function

Hi Team,

I am Using angular 9 Version CLI and Angular Version 9 and when i try to implement the syntax as per your guideliness in the website,

When i try to import APMService in the Providers i face the issue as show in the image .

import { ApmService } from "@elastic/apm-rum-angular";

Code tried in 2 formats:

Format 1:

providers: [{
provide: ApmService,
useClass: ApmService,
deps: [Router]
}],

Format 2 : providers:[ ApmService]

Error :

apm-service.js:8 Uncaught TypeError: Reflect.metadata is not a function
at Module../node_modules/@elastic/apm-rum-angular/dist/es2015/apm-service.js (apm-service.js:8)
at webpack_require (bootstrap:79)
at Module../node_modules/@elastic/apm-rum-angular/dist/es2015/index.js (index.js:1)
at webpack_require (bootstrap:79)
at Module../src/app/app.module.ts (app.module.ts:1)
at webpack_require (bootstrap:79)
at Module../src/main.ts (main.ts:1)
at webpack_require (bootstrap:79)
at Object.0 (main.ts:12)
at webpack_require (bootstrap:79)

1 Like

Hi @VamsiSama,

It seems like an already reported problem, Please find the solution here Has anyone been able to use @elastic/apm-rum-angular with aot?

Let us know if you need any other help.

Thanks,
Vignesh

Hi Vignesh, As refering to the issue #70,i did not find any resloution to the issue which i have mentioned.Kindly share a sample code or step to over come the issue in angular 9

I solved following this suggestion: https://stackoverflow.com/a/53791071/2012635

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.