# Can't compile Angular 10 with Elastic APM Angular package

**URL:** <https://discuss.elastic.co/t/cant-compile-angular-10-with-elastic-apm-angular-package/250987>\
**Category:** APM\
**Tags:** rum\
**Created:** [October 5, 2020, 12:04pm UTC](https://discuss.elastic.co/t/cant-compile-angular-10-with-elastic-apm-angular-package/250987 "2020-10-05T12:04:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rattkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rattkin/32/76659_2.png) [@rattkin](https://discuss.elastic.co/u/rattkin)\
**Post date:** [October 5, 2020, 12:04pm UTC](https://discuss.elastic.co/t/cant-compile-angular-10-with-elastic-apm-angular-package/250987/1 "2020-10-05T12:04:58Z")

</div>

I created new, blank angular app  
I installed the Elastic APM Angular package ([Angular integration | APM Real User Monitoring JavaScript Agent Reference [5.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/rum-js/current/angular-integration.html))  
The instructions are nice and seem simple but they are not complete.  
I get a console message:

> apm-service.js:8 Uncaught TypeError: Reflect.metadata is not a function  
> at Module.6SBv (apm-service.js:8)

I googled around and found this issue: [Has anyone been able to use @elastic/apm-rum-angular with aot?](https://discuss.elastic.co/t/has-anyone-been-able-to-use-elastic-apm-rum-angular-with-aot/198456/1)  
It suggested adding either `import 'reflect-metadata';` or `import 'core-js/es/reflect';` in `polyfils.js` It does not help.

I am able to use base agent-rum-js without angular extensions.

**APM Agent language and version** :  
@elastic/apm-rum-angular 1.1.8,  
@elastic/apm-rum-core 5.7.0,  
@elastic/apm-rum 5.6.1,

**Browser version** :  
Chrome 85

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:  
npm install @elastic/apm-rum-angular --save

**Fresh install or upgraded from other version?**  
fresh install on blank new app

**Steps to reproduce** :

1. follow official doc [Angular integration | APM Real User Monitoring JavaScript Agent Reference [5.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/rum-js/current/angular-integration.html#installing-angular-integration)
2. it doesn't compile

**Errors in browser console (if relevant)**:

> apm-service.js:8 Uncaught TypeError: Reflect.metadata is not a function  
> at Module.6SBv (apm-service.js:8)  
> at **webpack\_require** (bootstrap:79)  
> at Module.+/6d (index.js:1)  
> at **webpack\_require** (bootstrap:79)  
> at Module.ZAI4 (app.module.ts:1)  
> at **webpack\_require** (bootstrap:79)  
> at Module.zUnb (main.ts:1)  
> at **webpack\_require** (bootstrap:79)  
> at Object.0 (main.js:11)  
> at **webpack\_require** (bootstrap:79)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 26, 2020, 8:05am UTC](https://discuss.elastic.co/t/cant-compile-angular-10-with-elastic-apm-angular-package/250987/2 "2020-10-26T08:05:00Z")

</div>

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