Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not start game in DEV mode after update to 14.1.0 #1158

Closed
wpernath opened this issue Nov 2, 2022 · 6 comments
Closed

Can not start game in DEV mode after update to 14.1.0 #1158

wpernath opened this issue Nov 2, 2022 · 6 comments
Labels

Comments

@wpernath
Copy link
Contributor

wpernath commented Nov 2, 2022

Describe the bug
After updating dependency from melonjs 14.0.x to 14.1.0, I get a strange error on startup which prevents my game from running in DEV mode with:

npm run dev

This is the exception:

grumpycat.bundle.js?59623714b512b3421667:2388 Uncaught TypeError: Class extends value undefined is not a constructor or null
    at eval (TMXLayer.js:89:78)
    at ./node_modules/melonjs/dist/melonjs.mjs/level/tiled/TMXLayer.js (grumpycat.bundle.js?59623714b512b3421667:1333:1)
    at __webpack_require__ (grumpycat.bundle.js?59623714b512b3421667:2385:33)
    at fn (grumpycat.bundle.js?59623714b512b3421667:2607:21)
    at eval (TMXRenderer.js:6:70)
    at ./node_modules/melonjs/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js (grumpycat.bundle.js?59623714b512b3421667:1443:1)
    at __webpack_require__ (grumpycat.bundle.js?59623714b512b3421667:2385:33)
    at fn (grumpycat.bundle.js?59623714b512b3421667:2607:21)
    at eval (TMXOrthogonalRenderer.js:7:73)
    at ./node_modules/melonjs/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js (grumpycat.bundle.js?59623714b512b3421667:1432:1)
eval @ TMXLayer.js:89
./node_modules/melonjs/dist/melonjs.mjs/level/tiled/TMXLayer.js @ grumpycat.bundle.js?59623714b512b3421667:1333
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ TMXRenderer.js:6
./node_modules/melonjs/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js @ grumpycat.bundle.js?59623714b512b3421667:1443
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ TMXOrthogonalRenderer.js:7
./node_modules/melonjs/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js @ grumpycat.bundle.js?59623714b512b3421667:1432
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ TMXTileMap.js:10
./node_modules/melonjs/dist/melonjs.mjs/level/tiled/TMXTileMap.js @ grumpycat.bundle.js?59623714b512b3421667:1366
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ level.js:10
./node_modules/melonjs/dist/melonjs.mjs/level/level.js @ grumpycat.bundle.js?59623714b512b3421667:1311
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ index.js:102
./node_modules/melonjs/dist/melonjs.mjs/index.js @ grumpycat.bundle.js?59623714b512b3421667:1234
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ utils.js:12
./node_modules/melonjs/dist/melonjs.mjs/utils/utils.js @ grumpycat.bundle.js?59623714b512b3421667:2125
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ container.js:5
./node_modules/melonjs/dist/melonjs.mjs/renderable/container.js @ grumpycat.bundle.js?59623714b512b3421667:1751
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ renderable.js:8
./node_modules/melonjs/dist/melonjs.mjs/renderable/renderable.js @ grumpycat.bundle.js?59623714b512b3421667:1806
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ sprite.js:9
./node_modules/melonjs/dist/melonjs.mjs/renderable/sprite.js @ grumpycat.bundle.js?59623714b512b3421667:1817
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ atlas.js:9
./node_modules/melonjs/dist/melonjs.mjs/video/texture/atlas.js @ grumpycat.bundle.js?59623714b512b3421667:2158
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ cache.js:7
./node_modules/melonjs/dist/melonjs.mjs/video/texture/cache.js @ grumpycat.bundle.js?59623714b512b3421667:2169
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ webgl_renderer.js:9
./node_modules/melonjs/dist/melonjs.mjs/video/webgl/webgl_renderer.js @ grumpycat.bundle.js?59623714b512b3421667:2334
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ video.js:15
./node_modules/melonjs/dist/melonjs.mjs/video/video.js @ grumpycat.bundle.js?59623714b512b3421667:2191
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ application.js:5
./node_modules/melonjs/dist/melonjs.mjs/application/application.js @ grumpycat.bundle.js?59623714b512b3421667:1102
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ game.js:6
./node_modules/melonjs/dist/melonjs.mjs/game.js @ grumpycat.bundle.js?59623714b512b3421667:1146
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ state.js:8
./node_modules/melonjs/dist/melonjs.mjs/state/state.js @ grumpycat.bundle.js?59623714b512b3421667:1883
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ loader.js:9
./node_modules/melonjs/dist/melonjs.mjs/loader/loader.js @ grumpycat.bundle.js?59623714b512b3421667:1465
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ bitmaptext.js:7
./node_modules/melonjs/dist/melonjs.mjs/text/bitmaptext.js @ grumpycat.bundle.js?59623714b512b3421667:1971
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ base-text-button.js:6
./src/main/client/js/util/base-text-button.js @ grumpycat.bundle.js?59623714b512b3421667:591
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ title-menu.js:6
./src/main/client/js/stage/title-menu.js @ grumpycat.bundle.js?59623714b512b3421667:547
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ title.js:8
./src/main/client/js/stage/title.js @ grumpycat.bundle.js?59623714b512b3421667:558
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
fn @ grumpycat.bundle.js?59623714b512b3421667:2607
eval @ index.js:4
./src/main/client/index.js @ grumpycat.bundle.js?59623714b512b3421667:41
__webpack_require__ @ grumpycat.bundle.js?59623714b512b3421667:2385
(anonymous) @ grumpycat.bundle.js?59623714b512b3421667:3549
(anonymous) @ grumpycat.bundle.js?59623714b512b3421667:3551

Expected behavior
Game should run in DEV mode as expected

Device (please complete the following information):

  • Device: MacStudio Max
  • OS: macOS 13.0
  • Browser: Chrome 106 + 107
  • melonJS Version: 14.1.0

Additional context

@wpernath wpernath added the Bug label Nov 2, 2022
@obiot
Copy link
Member

obiot commented Nov 2, 2022

Hi, yes, indeed I encountered the same problem... the issue is linked to the new melonjs.mjs "ES6 chunk build" that we now publish to enable tree-shaking. It was working initially and then between that and some dependencies update and official release it was not anymore, and I'm not sure why yet... :(

I will publish a 14.1.1 this morning that also disable tree-shaking, and will keep investigating.

thanks !

obiot added a commit that referenced this issue Nov 3, 2022
@obiot
Copy link
Member

obiot commented Nov 3, 2022

@wpernath you can update to 14.1.1 now (just published) and it will solve the issue for now.

@wpernath
Copy link
Contributor Author

wpernath commented Nov 3, 2022

@obiot thank you very much!

@obiot
Copy link
Member

obiot commented Nov 5, 2022

I created an issue at rollup: rollup/rollup#4704

as I'm literally out of idea on why this is happening and how to fix it :(

FYI @L1lith

@obiot
Copy link
Member

obiot commented Dec 25, 2022

this one is fixed in the coming 14.2.0 release,

and comments shared with the rollup team :
rollup/rollup#4704

@obiot
Copy link
Member

obiot commented Dec 26, 2022

version 14.2 released, and boilerplate updated accordingly, we can now close this one for good.

@obiot obiot closed this as completed Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants