ct-js / ct-js

Ct.js is a desktop game engine that makes learning programming fun and game development easy by its visual editors and well-documented code library
https://ctjs.rocks/
MIT License
1.69k stars 130 forks source link

load.js from Supabase not being injected, causing the catmod not to work. #496

Closed hdboye closed 8 months ago

hdboye commented 8 months ago

Describe the bug The catmod 'supabase' isn't injecting it's actual supabase code into the catmod, causing the whole thing not to work. If you put the code from load.js into the code of index.js (all in ct.libs/supabase) then the module WILL work.

To Reproduce Steps to reproduce the behavior:

  1. Make a new project with a new room
  2. Enable 'supabase' catmod
  3. Start project, see "supabaseInit is not defined" in console.
  4. No supabase function works.

Expected behavior Load.js is supposed to inject itself into the catmod causing the supabase module to work as intended, allowing supabaseInit to be defined and allowing every supabase function to be used.

System information report Ct.js v4.0.0 😽 (packaged)

NW.JS v0.72.0 Chromium v109.0.5414.87 Node.js v19.3.0 Pixi.js v7.3.2

WebGPU UNAVAILABLE WebGL available WebGL vendor Google Inc. (AMD) WebGL renderer ANGLE (AMD, AMD Radeon RX 6650 XT Direct3D11 vs_5_0 ps_5_0, D3D11) OS win32 x64 // Windows_NT 10.0.19045

Screenshots (recommended) When the code from load.js is NOT in index.js image image

When it is image image No error. Supabase works as intended.

Example project (strongly recommended) supabaseError.ict.zip

Extra info I feel like I can fix this by just putting load.js into index.js, sending a PR and calling it a day, but I feel like there might be a bigger issue with the injecting, so I think I'll leave the fixing to you guys (especially since I'm too stupid to fix it)