Distribution package won't create with "Exclude Unused Files" option? [MZ]

It won't even give me the "Failed to create distribution package" error message that I see everyone else get when I search this issue.
It just shows me an empty progress bar that will never fill.
Capture.JPG


This only happens when I select the Exclude Unused Files option. I really don't want to have to spend an hour manually deleting every single unused file in my distribution package if I can help it.
Anyone else experience this issue before?
no, but I can think of several possible causes.

One possibility is that one or more of the files in your project are breaking one of the networking rules - for example the "no spaces in filenames" rules or something like this.

Second possibility is that you simply have too many files that are not part of the maker in your project.

Third option is wrong target directory. NEVER deploy into the same folder as your project, you need a different output folder for deployed games. And make sure that that target directory follows the networking rules as well - for example only latin letters and arabic numbers, no non-latin letters (which disqualifies the entire user folder if your username is in a language that uses different lettering).

if those three guesses don't help we need more infos about your project and your editor to help you
I've resolved the issue, however I still don't know what caused it in the first place.

What I did was I made a new project, then simply copied all folders from my previous project over the folders of the new project.

The only files that I didn't copy over were:
game.rmmzproject
index.html
package.json

So I guess whatever the problem was must've been somewhere in the data of one of those 3 files.
do you have a www folder inside your project? Hopefully not, but if there is then the error was a wrong deployment as I mentioned above.

the three files you mentioned contain absolute no project data, they are identical through all projects.
but there is a difference between a deployed package.json and the project package.json - if you deploy into your project directory the packages file will be overwritten with the wrong one.

Original thread: https://forums.rpgmakerweb.com/threads/distribution-package-wont-create-with-exclude-unused-files-option-mz.132185/