I suddenly started getting this error on Pavlovia:
ReferenceError: PsychoJS is not defined
I have a few code components, but they are simple JS if statements and also not importing/using any functions. The experiment worked just fine, I added a new routine (image and mouse click) and then started getting this error. Since then, I’ve reverted back to the last commit where the experiment was still working, but the error persists. There aren’t any error messages when syncing. Also not defining any variables called “PsychoJS”
Would anyone know what’s causing this reference error and how I could fix it?
Thank you, happy new year!
Hi @shiwenli, sounds like something may have gone wrong when exporting your project for the web. Could you send me a link to your repo so I can investigate some more? Thanks, s.
Hi @sotiri, many thanks for responding!
I ended up reverting back to an even older version of the experiment by deleting all files and replacing them with the older files (i.e. some of the new files were no longer there) and the issue went away. I then re-created/added the same routines and the issue didn’t appear again. So I think it’s resolved now.
Although…one thing that was different in one of the routines was the name of a mouse component (it was called “nextRoutine” before reverting). In the new routine it just had the default name that PsychoPy gave it. I don’t know if maybe the name “nextRoutine” conflicted with any of the variables PsychoPy creates?
No problem, yes if your trial was called
next, then there would have been a few key
nextRoutine containing variables in the output script, that might have been it, x