Which should've been read as a yes to that question, because it's all there.
ERROR FOUND
There MUST
NEVER BE a folder WWW inside your project folder - that is why your playtest works despite you having completely bungled your true project.
The WWW folder is created on deployment only, and if there is one such folder inside your project directory that means that at one time in the past you made the mistake of deploying your game into your project folder instead of an output folder. And that had redirected all playtests to the deployed version, ignoring any and all changes the editor made to the working version.
That is why your playtest always worked (it went to the old version) despite all errors you made into the project itself while trying to solve the problems you found.
Please enter the www folder and look at the date when those files were created - that is the last time your playtest worked correctly, because since you deployed into your project. Do not delete it yet, because you might need that data to get your project working again.
1) make a copy of your working project.
2) inside the copy, delete the www folder
3) make a NEW PROJECT
4) copy the packages.json from the new project to the copy where you deleted the www folder
5) the copy is now repaired, but launching a playtest in the copy will probably get you the errors you have in your last deployed version into the playtest itself, and you'll now have to fix them in your project (with the correct error messages there).
depending on what you changed and how many additional errors you created while looking for the problem, it might or might not be easier to copy the contents of the old deployed version into the new project directory - after all that deployed version was the last time everything worked correctly.