-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
"Cannot read property 'start' of null" #630
Comments
Hey, By default transform-remove-undefined is applied on the plugins list. Can you give a minimal code to reproduce this issue? Check the list of defaults here - https://github.com/babel/babili/tree/master/packages/babel-preset-babili#options There was a similar issue before #615 and it got fixed already in master. We have not released a new version though. |
OK, I will try to get a minimal example running. If |
Versions: babel-cli: 6.24.1 .babelrc:
The smallest example I could get is:
If I specify a value for
It seems to happen only if The error only shows up if I declare the variable beforehand then attempt to change it with destructuring; if I declare it and set it at the same time, using either
With all this being said, an easy way to avoid this bug is by setting a value at the start, but it is still an unexpected, hard-to-track-down bug that should be fixed. If you need any more information, just ask. |
Awesome, Thanks for the detailed writeup. Really helpful. Seems to be a bug still in master, Will have a look. |
No problem, glad I could help. Thanks for the great plugin and getting back so quickly! |
Looks like it works, thanks! |
Whenever I try to run
babel
with the fullbabili
preset, I get an error frombabel-plugin-transform-remove-undefined
:I tried this with only
babel-preset-env
andbabili
. I am using so much ES6 thatesprima
does not know what to do without at least some plugins. I get "Invalid left-hand side in assignment".I noticed that the referenced plugin,
babel-plugin-transform-remove-undefined
, is not in the list of plugins on the mainbabili
README file, either in the main section or in the "Other" section, so I can just copy all the plugins in the main section and use the ones that I want from the "Other" section, and everything works fine. With npm 3, I can even do this without installing all the plugins individually, as long as I remember to installbabili
itself.What is the plugin
transform-remove-undefined
, and why is it not in the plugin list onbabili
's README file? Is it not finished or deprecated, or is it an internal plugin thatbabili
always uses?The text was updated successfully, but these errors were encountered: