I’m getting the error ““define” is not defined” in my .js code, but only in the glitch editor, it seems to work fine on visual studio. I feel like i’m missing something really basic, but I just can’t think what it is!
Standard JavaScript does not have a define function, so you may need to hunt down what allowed you to use it in vs code.
If memory serves correct, define was a requirejs mechanism for creating modules back when nothing had modules built in (before ES modules or even Node.js!) so if this is an older codebase you might just need to load whatever the latest version of requirejs is (2.3.6 it looks like from cdnjs).
If it’s a new codebase, of course, it’s probably not requirejs and you’ll want to have a look at where VS code thinks define lives: if you right-click on it and pick “go to definition” you should jump to where it’s defined, and the file path “breakcrumb” in the top of VS code should show you which file you’re now in, which is usually enough to tell which dependency/dependencies are involved.