When migrating a p5.js project I have been working on from Visual Studio Code to the p5.js Web Editor, I encountered an issue where whenever I attempted to run the project it would give me the error:
TypeError: e.set is not a function
at undefined:2:64726
My current version of the p5.min.js file is 1.6.0 and I have tried using Edge, Chrome, and Firefox to the same results. The project runs fine whenever it is launched from Visual Studio Code.
The project itself is a simple JRPG coded from the ground up, and there is already an older version of it running fine on the Web Editor, though this is from quite a long time ago and I have made a lot of changes and additions since then.
I think the error is referring to a portion of the p5.min.js file, but I don’t want to edit anything in that for fear of breaking it even more. After trying different versions of the file and different browsers, I have no idea what could be causing this, and as the program runs fine whenever I launch it from Visual Studio Code, and as the error the Web Editor throws doesn’t provide me with any information about where in my sketch.js file (which is over 12000 lines long) there could be an issue, I have no idea how to go about fixing this.
The portion of the p5.min.js file being pointed to by the error is this (the specific character is the first ‘f’ character):
87:[ function(e,t,r){var o=e(“../internals/is-regexp”);t.exports=function(e){if(o(e))throw TypeError(“The method doesn’t accept regular expressions”);return e}},
I tried switching my p5.min.js file with an older version (1.3.1) that was in an older version of my project that does still run fine on the Web Editor (though I later realized that the older version of the project seems to be pulling from version 1.4.0, which is being stored elsewhere). I also tried opening the Web Editor in Edge, Chrome, and Firefox. No matter what I did I either got the TypError error thrown six times, or worse got it constantly thrown with my laptop being slowed down to a crawl. I’m beginning to worry that I simply won’t be able to share my project, as the only way I know how to put it up on my Google site like I plan to is by first saving it on the p5.js Web Editor and then embedding the project from the Web Editor into the site.
What should I do? Is there a way to fix this issue? If not, is there another way that I could embed my game?
