# Installing RUM Agent

**URL:** <https://discuss.elastic.co/t/installing-rum-agent/184166>\
**Category:** APM\
**Tags:** rum\
**Created:** [June 4, 2019, 11:43am UTC](https://discuss.elastic.co/t/installing-rum-agent/184166 "2019-06-04T11:43:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaby](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@Gaby](https://discuss.elastic.co/u/Gaby)\
**Post date:** [June 4, 2019, 11:43am UTC](https://discuss.elastic.co/t/installing-rum-agent/184166/1 "2019-06-04T11:43:55Z")

</div>

Hi,

I'm currently trying to setup the RUM agent on my application server using the "Package Managers" method.  
I'm not a web developper and I know very few about NodeJS. But from what I can understand from the [documentation](https://www.elastic.co/guide/en/apm/agent/js-base/master/getting-started.html), I suppose I need to create a JavaScript File (e.g elastic-rum-agent.js) containing the piece of code given in the procedure which is starting by :

> import { init as initApm } from '@elastic/apm-rum'  
> const apm = initApm({  
> [...]

Unfortunatly, when I launch this code with the command "node elastic-rum-agent.js", I get an error like this :

> /root/node\_modules/elastic-rum-agent.js:1  
> import { init as initApm } from '@elastic/apm-rum'  
> ^  
> SyntaxError: Unexpected token {

Do you please have any idea of what is it related to ?  
Is this the right way to install the RUM agent by the "Package Managers" method ?

Thank you in advance for your help

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [June 7, 2019, 9:17am UTC](https://discuss.elastic.co/t/installing-rum-agent/184166/2 "2019-06-07T09:17:55Z")

</div>

Hi @Gaby,

Thanks for reaching out.  
The Real User Monitoring (RUM) agent is meant to be used with JavaScript applications that run in browsers.

If you want to monitor a Node.js application you should use [Elastic APM Node.js agent](https://github.com/elastic/apm-agent-nodejs).

Let me know if you have more questions.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![Gaby](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@Gaby](https://discuss.elastic.co/u/Gaby)\
**Post date:** [June 7, 2019, 2:49pm UTC](https://discuss.elastic.co/t/installing-rum-agent/184166/3 "2019-06-07T14:49:27Z")

</div>

Thank you for your response,  
I think I have a bad understanding of the "Package Manager" method and I gonna try the script tag method which seems simpler

Thank you for your help

---

<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:** [June 28, 2019, 10:49am UTC](https://discuss.elastic.co/t/installing-rum-agent/184166/4 "2019-06-28T10:49:33Z")

</div>

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