New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createTypeAnnotationBasedOnTypeof(type) throwing error when not supposed to #6880
Comments
Hey @gchamon! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
Which is the code that causes babel to throw? A starting point for a proper fix would be to understand why there is that space. |
That goes without saying, but following the traceback we can see that the error is raised in the scope of the babel-traverse -> minify then all the way to babel-type so it is all self contained inside babel-maintained code, which means that even if I pinpointed the source of the issue I wouldn't be able to correct it myself without diverging from this repo. Anyway, the provided "hack" works and everything minifies as expected (too well actually, I need to figure out how to make it respect angular names so it doesn't break the framework) I just wanted to know if there was another workaround that doesn't involve modifying third party code, because we don't have the resources to maintain modified code |
Can you provide an example of code which, when run trought Babel with the |
I am sorry I did not update you guys on the issue. I believe the issue was with our code, some typo an ex-employee left and nobody knew what was going on. Really sorry to waste your time on it. This should be closed and, hopefully, forgotten. |
@gchamon thanks for the update! let us know if you run into it again! |
Ran into an issue using babel with gulp, where the mentioned function was throwing the following error:
upon investigation, I decided to verify what was actually inside
type
by modifying the functioncreateTypeAnnotationBasedOnTypeof(type)
inside flow.js, altering the error throwing line to:which now, interestingly, yelds the error:
Notice the blank space after
undefined
. Trying a hack to make it work, replacing" "
to""
as in:gulp runs fine alright. What is going on?
The text was updated successfully, but these errors were encountered: