Sign in to follow this  

MelonJS sample source not working

Recommended Posts

Hi there, I've installed the MelonJS Platform tutorial exactly as described, and unfortunately it is not working.

at first it needs a bunch of grunt files installed, so I've done that now I just get a black screen (and melonJS won't load) on localhost:8000

the only error is see when running npm run serve is

"Local Npm module "grunt-asar" not found. Is it installed?"

can anyone help me? It's really unfortunate to see the MelonJS Platform broken like this.

I did install it a few years ago successfully, but something now is so wrong! Can anyone help me figure out what I'm doing wrong?





Share this post

Link to post
Share on other sites

Hi, Again with this error ! (facepalm)

are you using the latest version of the boilerplate ? this was addressed in the latest commits (

see as well here :


but yes the boilerplate really/definitely needs a big update (remove grunt) and switch to either webpack or rollup 

Share this post

Link to post
Share on other sites

Yes, even if you download the lastest boilerplate,

it still comes up with (on npm install)

npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.


I tried reading the link you posted above. still doesn't work. (I followed the steps exactly)

Really would like to be able to play with melon.js but man, is this difficult when nothing works!!!!


Can you not just post a working MelonJS platform tutorial?  Or post one without the 

grunt-asar that actually works?


Thanks in advance for your help, I think melonjs is awesome as I used it years ago (also that one installed easy back then)

so surprised I can't even get the MelonJS Platform tutorial to work at all!!!!

Share this post

Link to post
Share on other sites

just to be clear though, the build process in the boilerplate is to actually build a one file minified version of the game, and additionally automatically generate the asset file.

nothing prevent from actually using the boilerplate "manually" by running the provided index html file, without building the whole thing (or even just not using the boilerplate, it's not mandatory) and manually building the resources file yourself :



Edited by obiot

Share this post

Link to post
Share on other sites

Ok making a bit of progress... I can get the maincharacter to appear (but falls right off the screen) -- -so now I'm trying to put in a collision layer - but when I edit the map file and put a rectangular collision as you see in the screenshot melonjs won't load my character won't appear and melonjs won't load (it crashes)

(but doesn't throw any errors) obviously an issue with the tiled file - can anyone see why the collision layer at the bottom would prevent MelonJS from loading at all?

That collision layer in picture below works with the top two collision rectangles but not when I try and add the bottom one.

Any idea why?



Share this post

Link to post
Share on other sites

Ok figured that issue out... is was me... not Melonjs LOL

looks like if you change the map file in the data folder you need to manually copy it over to the data folder in the build folder yourself and then melonjs is happy



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.