# Error when reloading page / import CommonJS

**URL:** <https://community.bitmovin.com/t/error-when-reloading-page-import-commonjs/2025>\
**Category:** Support\
**Tags:** web\
**Created:** [June 5, 2023, 11:05pm UTC](https://community.bitmovin.com/t/error-when-reloading-page-import-commonjs/2025 "2023-06-05T23:05:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafael.f.iga](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/rafael.f.iga/32/484_2.png) [@rafael.f.iga](https://community.bitmovin.com/u/rafael.f.iga)\
**Post date:** [June 5, 2023, 11:05pm UTC](https://community.bitmovin.com/t/error-when-reloading-page-import-commonjs/2025/1 "2023-06-05T23:05:30Z")

</div>

Hello there!

When reloading a page that has:

import { Player } from ‘bitmovin-player/modules/bitmovinplayer-core’

I got the following error:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/d11298d48f4b6aae4a4a2df938fbac86fc053bdd.png)

I have Page index and Page show, if I open Page show from Page index, the page works.

If I try to reload, I got the error above.

The issue does not happen on development, only on production build.

The app has the following config:

“nuxt”: “^3.3.1”,  
“bitmovin-player”: “^8.105.0”,  
“bitmovin-player-ui”: “^3.44.0”,  
“vue”: “^3.2.41”,  
“vite”: “\>=2.9.0 \<3.0.0 || \>=3.0.0-0 \<3.0.0”,

Thanks,

---

<div class="post-metadata">

**Author:** ![rafael.f.iga](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/rafael.f.iga/32/484_2.png) [@rafael.f.iga](https://community.bitmovin.com/u/rafael.f.iga)\
**Post date:** [June 12, 2023, 3:27pm UTC](https://community.bitmovin.com/t/error-when-reloading-page-import-commonjs/2025/2 "2023-06-12T15:27:06Z")

</div>

Changing the import to:

import BitmovinPlayer from ‘bitmovin-player/modules/bitmovinplayer-core’

and then using with getModuleExport:

const Player = getModuleExport(BitmovinPlayer)

It works now!

---

<div class="post-metadata">

**Author:** ![ludovic.michaud](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/ludovic.michaud/32/811_2.png) [@ludovic.michaud](https://community.bitmovin.com/u/ludovic.michaud)\
**Post date:** [August 28, 2023, 7:43pm UTC](https://community.bitmovin.com/t/error-when-reloading-page-import-commonjs/2025/3 "2023-08-28T19:43:08Z")

</div>

Thanks for your feedback.  
We’re glad to hear that it works now.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/1ab86334145095b0af9c5b924fa3ae6d920b6482.png) [@system](https://community.bitmovin.com/u/system)\
**Post date:** [August 28, 2023, 8:43pm UTC](https://community.bitmovin.com/t/error-when-reloading-page-import-commonjs/2025/4 "2023-08-28T20:43:15Z")

</div>

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