Show error in editor when importing backend modules

I tried importing the “wix-router” module into a “page code” in the editor (in order to do some page redirection).
Only when I ran some test code I saw in the browser’s console that the module can’t be found - which makes sense since this is considered a backend module.
It would have s aved me some time and would have given me a smoother on-boarding experience if I saw an error message when I wrote the import line (in the editor).
Since Wix code is relatively new I’m assuming more people will make similar mistakes :slight_smile:

I’m guessing that showing an error for a list of specific modules to be shown when used in the wrong location (FE vs. BE) shouldn’t be so hard to implement and will help coders on their first steps @ Wix code.

Good luck.

Cheers,
Shy

P.S

Attached are screenshots from the editor and the browser’s console in case I wasn’t clear

Thanks for the feedback! We’re aware of these issues and they will be resolved in the future.