HI I FIXED IT


HI GUYs I FIXED THE GAME ITS NO LONGER BROKEN

(there is no new content, and there will never be :c)

However, this bug goes deeper than CLEANSED. This has broke nearly everything I have made recently. In this short post I’ll go into what broke it, why, and maybe teach you an important coding lesson. If you don’t want to read this and just want the moral, it’s bold at the bottom :)

For probably 2 years at this point I’ve been using the JS library Vue.JS for all my projects. In their documentation, they had a URL they recommended you use to load Vue. However, I was tired of going back to the documentation every time I started a new project–so I found a website called “Unpkg” which let me get Vue by just typing “unpkg.com/vue” into a script tag. It was easy, it worked, and it loaded fast–what more could I ask for?

So fast forward to yesterday. I was on my website and I try playing CLEANSED. It gives me an error, but I don’t think much of it. A couple hours pass, and I get a DM from someone on Discord saying that a project I hadn’t touched in a year was suddenly broken. Because I’m nice, I say I’ll fix it. I ask them to take a screenshot of their console (standard debugging procedure ig), and there’s an error in there–Uncaught TypeError: Vue is not a constructor and it hits me: Vue updated.

In all of my projects, I was using Vue 2. For quite some time, Vue 3 was in beta. They finally came out with Vue 3, and because I didn’t specify the version of Vue in all my projects, I now need to go back and change the URLs to specify that I want Vue 2, and not the (now default) Vue 3. Well, that’s one way to spend a Wednesday.

MORAL OF THE STORY: If your package manager doesn’t do it for you, make sure to specify library versions. I guess this should be a simple idea, but I never learned it. And I’m making this post in the hope that it’ll save someone in the future. Who knows :/

Files

game-vue-fix.zip Play in browser
Feb 09, 2022

Leave a comment

Log in with itch.io to leave a comment.