I'm getting a Babel error, why?

I recently started seeing errors in my logs that look like this:

“[”[BABEL] Note: The code generator has deoptimised the styling of /user-code/backend/http-functions.js as it exceeds the max of 500KB.“]”

I have no real idea what this means, or what to do about it, if anything. It seems to indicate that my http-functions.js file is too big? What are the ramifications? Will functions not get executed?

Hello,
Thanks for letting us know about this error. Please provide the URL for your site, steps to reproduce, and what happens when you execute the code. The team will investigate as soon as we have this information. Thanks!

It started happing yesterday every time my ‘pendingtransfers’ back-end https function was being called by someone using my mobile app.

I went through today and deleted a bunch of comments, presumably reducing the overall file size, re-published the site and I haven’t seen this error since.

What are the limits of http-function.js? Size-wise, function-wise, etc.?

We are getting read to add some new functions to our API and don’t want to cause any kind of an issue…

Thanks.

Thanks! I’ll report back as soon as I have some info from the team.

In the meantime, this article, " About Backend Limitations , " might provide some helpful information.

Thanks - that article doesn’t mention anything about file size or numbers of functions, just how long they need to be able to execute.

I ran into it lately also: file size was 191 Kb. These are the answers I got from the Masters-channel:

“Babel is a common tool in the JS world that we use to support “new” JS features even before those were officially supported by NodeJS.The warning above refers to the file size after it was scanned by Babel. I still find it weird that the change in size is that big.
You can ignore it, We’ll try to investigate further.”

“The reason it gets this big is because we need to save some metadata after using Babel - once it laters the file, code that once was on line 10 is now on line 15, and we save this mapping. This bloats babel a bit.feel free to ignore it for now. We’ll try forcing babel not to display it at all.”

In short: don’t worry about it, ignore the errors in Google Operations, code will continue.

Thanks for the update. I’ll ignore it if I see it in the future

Btw Marlowe/Giri, while I have you…:grinning:, any further update on being able to do a custom reset/change password flow?

Yes I realize I just broke every forum law and best practice by mixing diverse issues into the same post, but it is really hard to get an answer on that one - going on two years now since me and several others have been asking and all we’ve heard is “we are working on it”.

Hahaha, glad you are aware of the Forum rules! :smiley:

The new API should be out later this month. It will enable you to send a site member an email with a link to set their password.

Marlowe - so here we are at the end of the month…any update on the API?

Tad

Not yet! I’m expecting it to release any day now. I’ll update this thread as soon as it’s available.

The new API released today! Check it out here: https://www.wix.com/velo/reference/wix-members-backend/authentication-obj/sendsetpasswordemail

Marlowe -

I implemented this API, and I must say I’m pretty disappointed that this is the API we have been waiting for for over a year now. Here are my issues (upper case isn’t me shouting at you :), it’s me providing emphasis):

  1. EVERY SINGLE request around this issue talked about the need to be able to customize the email that gets sent. I really don’t want a Wix branded email sent to my customers for something as fundamental as password reset. I want my own branded email used - why have I paid the premium subscription to have all the Wix branded stuff removed from my website only to have it show up again on something as basic as a password reset?

  2. Why would I want a password reset email to say: “Questions? Visit Wix Support”??? I want my customers coming to ME for support!

  3. Why does the title say “Forgot you password?”? There are many other reasons someone might want to reset a password other than they forgot it. Sure, this might be the most common, but again, WE NEED THE ABILITY TO CUSTOMIZE THE MESSAGE!

  4. Clicking the “Reset Password” button takes me to another Wix branded page. My customers are now confused - “why am I being prompted to log into Wix?”

There should really be TWO MAJOR ADJUSTMENTS to this API:

  1. The web-based API approach (i.e. causing a web page to be launched which explains what is going on, what the user needs to do, etc.) needs to utilize custom pages and a customized email, if the Wix website owner has provided them. The fallback can be what is there now.

  2. There needs to be a completely API driven approach here for users that either don’t want a web based one, or want an additional experience to the web based one. For example, my mobile app users don’t need or want to have a web page launch to change their password, they would like it to be handled in the app (with a launch of their email reader if they need to click on a link in the email). Why can I not completely handle this in a communication back and forth from my back-end functions to my mobile app?

I won’t be implementing this API any time soon. It is simply not a good user experience.

I’m happy to volunteer to help out in the planning/testing stages of future changes to this API. I simply can’t believe most of your users will accept this as a proper way to provide password reset - even those customers that have a website only and aren’t concerned about a native mobile app.

Thank you for your feedback. I will share it with the product team and let you know when I hear back from them.

Hi again,
One of the product managers responded in the other post you created on this topic: https://www.wix.com/velo/forum/main/comment/61840ee641c12d0016d8fdd1

If you have follow-up questions or comments, please use that thread so Or will see it. Thanks!