`Type Error: e is undefined`.
Hello, Vue forum!
I wanted to seek help / guidance on an issue that I'm facing in my Vue application that **I have been struggling with for weeks** now-
I'm not sure where to take this issue if I can't get it solved soon. Apparently, I'm pretty much in 'the nightmare zone'. Let me share with you the details
The project is running on Vue version
I have had big difficulty reproducing this error
First of all, the app works perfectly fine in development mode , however (as I will link to), when run in production mode, the app produces an error:
Type Error: e is undefined(Mozilla Firefox) when I mount a specific route.
Secondly, in the vue-cli build logs, I can see various warnings relating to file size limits. I will link to a gist with the relevant (the rest of the outputs are typescript warnings) in the links above!
These two details have led me to believe that the issue is caused by a bundling error
Steps to reproduceAs I mentioned before, the issue is only present in production mode. Therefore I have released the app on Netlify for reproduction. Here are the steps:
- Visit the app on netlify
- Scroll down to the "Sign up" form and create a fake account to test the bug
- Login using these credentials at the login page
- Open the console
- Visit the "world" screen and click the button that says "Explore Monokai"
Expected outputYou should see a loading screen for some time while the assets load, and then a map should appear on the screen. You should be able to, with your cursor, navigate this map up and down, as well as click on the various shops.
Actual outputThe screen appears to be loading indefinitely because an error has ocurred that has stopped the app. The error should now appear in the console, reading
Type error: e is undefined(on Firefox)
It has been suggested that this bug is caused by an event handler holding an event variable called
e. However, this is not the issue as the component does not make any calls to any
e variables. However, when the app is bundled variable names are minified, so
e could be any variable in the code. this further advances my theory that this bug is caused by the bundling process
I have put up the relevant source code for the Map.vue component as a gist that can be accessed through the link in the links above