Received packet in the wrong sequence

I have a very similar issue (using mysql and the netlify functions express demo app) to hit a DB on heroku (also tried on an AWS RDS instance)

I get the same error and I can’t figure out what is causing it. It will work locally but not when it is published.

I have seen a few threads here and there mention mysql config or import getting stepped on or removed during the build process. Something to do with webpack and where and how mysql is declared and configured. But nothing explaining what to do about it