TypeError: visual.Window is not a constructor

Hello,

I’m running into an issue while attempting to run my PsychoPy experiment on Pavlovia. When I try to create a window in JavaScript using visual.Window, I receive the following error:
‘’’ PsychoJS.js:873 TypeError: visual.Window is not a constructor
at Scheduler.experimentInit [as _currentTask] (27.js:132:15)
at Scheduler._runNextTasks (Scheduler.js:225:24)
at async Scheduler._runNextTasks (Scheduler.js:232:13)
at async update (Scheduler.js:139:18)

log4javascript.js:148 FATAL 20:15:23.330 _GUI.dialog psychojs-2024.2.3.js:1201 | {}
27.js:132 Uncaught (in promise) TypeError: visual.Window is not a constructor
at Scheduler.experimentInit [as _currentTask] (27.js:132:15)
at Scheduler._runNextTasks (Scheduler.js:225:24)
at async Scheduler._runNextTasks (Scheduler.js:232:13)
at async update (Scheduler.js:139:18)
‘’’
I am using PsychoPy version 2024.2.1. Below is the relevant code where the error occurs:

// Window
const win = new visual.Window({
size: [1200, 800],
units: ‘pix’,

It seems that visual.Window is not being recognized as a constructor.

I’m new to PsychoPy and really need your help. Any insights into why this might be happening or any alternative methods for setting up a window in PsychoJS would be greatly appreciated!

Thank you so much!

Are you trying to write a PsychoJS experiment in Coder?

Please use Builder.