Error When Trying to Open Lightbox

I am getting this read message in the console when the code below runs:

Error: Error parsing web-module ‘public/pages/fvbud.js’: ‘import’ and ‘export’ may only appear at the top level (550:0) while parsing file: public/pages/fvbud.js

Code:

wixWindow.openLightbox('Lightbox Name')

How does one fix this?

I guess you have written the import lines of wix window or some other API somewhere in between the normal coding section. Post the full page code so that I can check the issue.

I just found a way to fix it, I was missing a bracket, but thank you anyway.