Uncaught type error after deployment

When I deploy with all the asset including the unused ones, everything is fine.


When I exclude unused files, I get this error when I start the game:


Uncaught type error: Cannot set property "_bgmbuffer" of null.


How do I fix this?
My first suggestion would be to check your plugins for which resources they might require.


The editor function to detect if a file is used or not cannot check special plugin properties, and that has now removed some picture that is needed.


Best solution in my opinion would be to find the required resource and then make a hidden and unused map where you place that resource in an event (depending on what it is), then the editor will detect it as used and keep it while still removing the rest.
Are you still having the error?  I usually see this when you have an extra file in your folder.  In my case,  Made a shortcut inside the folder to IMG ( its most used for me) so I can pin this to my taskbar -- I created the shortcut but left it in the folder.  RMMV couldn't figure out what to do with it.  Didn't work untill I removed it and had only the files that RMMV required.
I might have to do it manually and delete the ones that aren't used in the game.
Have you already tried what I asked?  How did it go?
Have you already tried what I asked?  How did it go?

Ive tried, still not working sorry.
Hi, im having the same issue.. was it fixed??
Hi, im having the same issue.. was it fixed??
No, you don't have the same error - because "uncaught type error" is a general message that can have hundreds of different causes. And mixing them up in one discussion will only cause confusion.

Please make your own topic for the error and give a screenshot of the full errortrace (open console with F8) there.

Moderator note: Please do not hijack other people's problem topics, but create a topic of your own.
Necro-post notice: BreezyDigimon15

Original thread: https://forums.rpgmakerweb.com/threads/uncaught-type-error-after-deployment.63820/