# Rex-plugins: VirtualJoyStick.setEventEmitter Errors

**URL:** <https://phaser.discourse.group/t/rex-plugins-virtualjoystick-seteventemitter-errors/11381>\
**Category:** Phaser 3\
**Created:** [March 11, 2022, 5:15pm UTC](https://phaser.discourse.group/t/rex-plugins-virtualjoystick-seteventemitter-errors/11381 "2022-03-11T17:15:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanleyseow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/stanleyseow/32/1190_2.png) [@stanleyseow](https://phaser.discourse.group/u/stanleyseow)\
**Post date:** [March 11, 2022, 5:15pm UTC](https://phaser.discourse.group/t/rex-plugins-virtualjoystick-seteventemitter-errors/11381/1 "2022-03-11T17:15:35Z")

</div>

I hv the following setup , Vue2 loading Phaser3 in a div with phaser3-rex-plugins loading vJoystick

I can load vJoystick with Phaser3 standalone but when loaded from Vue, it gives the below errors…

vJoystick loaded in world.js

Any points on how to resolve this ?

Thanks

A minimal repo here. phaser is game folder :

> **[GitHub - stanleyseow/Vue2-Phaser3-Test](https://github.com/stanleyseow/Vue2-Phaser3-Test)**
>
> Contribute to stanleyseow/Vue2-Phaser3-Test development by creating an account on GitHub.

```javascript
EventEmitterMethods.js?56de:4 Uncaught TypeError: Cannot read properties of undefined (reading 'EventEmitter')
    at VirtualJoyStick.setEventEmitter (EventEmitterMethods.js?56de:4:1)
    at new VirtualJoyStick (VirtualJoyStick.js?b403:15:1)
    at VirtualJoyStickPlugin.add (virtualjoystick-plugin.js?38a6:15:1)
    at world.create (world.js?5e60:103:1)
    at SceneManager.create (phaser.js?d4ef:100338:1)
    at SceneManager.bootScene (phaser.js?d4ef:100218:1)
    at SceneManager.start (phaser.js?d4ef:100926:1)
    at SceneManager.processQueue (phaser.js?d4ef:100024:1)
    at SceneManager.update (phaser.js?d4ef:100278:1)
    at Game.step (phaser.js?d4ef:162805:1)

```

---

<div class="post-metadata">

**Author:** ![stanleyseow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/stanleyseow/32/1190_2.png) [@stanleyseow](https://phaser.discourse.group/u/stanleyseow)\
**Post date:** [March 14, 2022, 7:45am UTC](https://phaser.discourse.group/t/rex-plugins-virtualjoystick-seteventemitter-errors/11381/2 "2022-03-14T07:45:31Z")

</div>

Someone forked my repo and fix it within Vue components

The codes as below :

> <https://github.com/stanleyseow/Vue2-Phaser3-Test/commit/268d11e31d62347c1148344e8edbc7e1fef90978>
>
> fix game not running
