I know, I know, not the place for bugs. I already submitted a ticket, but I am completely down because of it.
Problem
Existing code (for ages). Error on frontend. Google Operations shows "shorthand errors" , see attachment 1. The line in code itself has no errors, see attachment 2. If I retype it, the window with suggestions DOES NOT LIST gbookcore (nor many others), but it exists, see left pane (has existed for 1.5 years). See attachment 3.
Everything is down, could somebody please elevate this. I have no ticket number, the Support bot just said that I will be contacted by an expert.
Update: pics are in reverse order, so start at bottom one.
Update 2: managed to restore an older version. Published. Works. Do not dare to touch the code.
The good news: found the problem. The bad news: it's not a bug, but very strange Velo behavior. Here we go:
1) I have a page (A), which calls a function inside a .JSW (B), which calls functions in a .JS (C).
2) in C, I made a mistake:
return { msgType = "success", msgValue = ""};
3) eslint does not flag it as an invalid object
4) when page A loads, it generates the "shorthand error" with location inside B. So not in C, where you would expect it.
5)it does so (generate the error in B) when it encounters the import of functions from C
In short: no eslint, and an error on page C which is reported as having occurred on page B. That takes you a while to find.
The behavior in image 1 (it only shows .jsw's and all of them double [with and without .jsw-extension]) had nothing to do with it, but I find it enormously confusing. Cant we just have 1 instance of the .jsw's, together with the .js's?
Anyway, @Marlowe (Wix) , thanks for help, support contacted me, I'll update them.
Hi Giri,
I've found the ticket and will see about getting you help. Stay tuned...