Question:
I’m a developer under HUGE pressure to get a project I’ve been working on for the last 2 weeks finished by this Friday. I’m building a widget in Wix Blocks. I’m trying to trade using hardcoded values for backend values, and trying to figure out how to call backend functions from my widget’s frontend. After trying various things that didn’t work, I wanted to go back to my working version so I undid all my changes. After I did that, The “Run” command I use to preview all immediate changes to confirm if they work completely hangs. the widget’s $w.onReady() function does not run. Even for a brand new blank test widget, the code Run command is Broken and does not print a single console.log() output. I’ve tried commenting out all import statements and backend code but still nothing. When I run my widget code, it’s like it throws an immediate error and doesn’t even begin execution at all. But when I prepare a proper test (after this issue) and added the widget to a page on a real site, It works properly like it did (and always has) in the Run, So I’m positive there’s no issue with the widget code itself. What have I done to my Preview Run and how can It be fixed?
Please provide any assistance urgently. It’s past midnight so I’ll check this tomorrow but this adds a delay and a massive amount of stress onto an already extremely stressful situation for me.
Product:
Wix Studio Blocks Editor / Velo Code / Widget
What are you trying to achieve:
Run my code to preview my working widget.
What have you already tried:
Removing all import statements and backend code, Testing on my widget and a brand new just created widget with nothing but a single console.log on $w.onReady(), Tested with another browser (Incognito tab), Compiled for test and added to a test page on my website where it worked without issue.
Additional information:
had a backend/function.js file with a function I implemented and tested on, and called that from a backend/function.web.js that wrapped the function in a webModule, and tried to call the webModule from the widget code. Was having trouble with Async Await, wouldn’t let me use await, tried to add async to all function declarations. Didn’t work so I wanted to go back to my working state, so I ctrl+z all changes back to before I made any edits and had a working version. When I Ran the developer console, It froze, and does not initialize, run, or error. It does this on every widget.
EDIT : Added photos