ReferenceError - require is not defined

Hello all, I get this error "ReferenceError require is not defined" when I export/deploy my project to html.


It works in the editor, just not when I deploy it.
What plugins are you using? One of them sounds like it only works on the desktop clients, as it's using a feature that's only available there. 
What plugins are you using? One of them sounds like it only works on the desktop clients, as it's using a feature that's only available there. 



Ah okay thanks. Well I don't really know which ones to use so I pretty much setup a bunch of YEP's and organized them like they were supposed to go. THen I just went down the list and activated what either 1) Enhanced vanilla RMMV features, or 2) I liked the sound of.


I'll go through the list and check for anything that only use Desktop features.
Another possibility is that you're using a resource that has an illegal filename.


Windows allows and redirects filenames with non-latin letters or spaces, but those are absolutely no-go in any networking environment.


If you used a filename with forbidden letters, Windows would still recognise them and redirect them, but a browser cannot do that (and neither could mobiles or OSX as they use other directory structures).


If that is the case, you'll have to check all filenames and rename the wrong ones (including renaming their ingame-references) until it works.
Another possibility is that you're using a resource that has an illegal filename.


Windows allows and redirects filenames with non-latin letters or spaces, but those are absolutely no-go in any networking environment.


If you used a filename with forbidden letters, Windows would still recognise them and redirect them, but a browser cannot do that (and neither could mobiles or OSX as they use other directory structures).


If that is the case, you'll have to check all filenames and rename the wrong ones (including renaming their ingame-references) until it works.



Alrighty. Well I did a folder search for any .js files that used the function 'require' and found a few of them. I think it was OrangeMapshot.js that was the culprit, that and a minimap plugin I was using.
Lucky you got one, my search resulted in 63 .js files...
Necro-post notice: @Nereid

this thread is 5 years old!

Original thread: https://forums.rpgmakerweb.com/threads/referenceerror-require-is-not-defined.61527/