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
path.remove
sometimes throws
#300
Comments
The problem could be us transforming |
facebook/react-native#10412 seems related (as brought up by @danez) |
Hmmm.. I tried reproducing that in babel. |
It seems in a lot of cases In the example I replaced it with undefined. |
Ah. That makes sense. When we remove, we have to know the context of where it is. But doesn't babel's |
Maybe this is broken. Interestingly if i do:
it turns correctly into:
|
We should probably address this in Babel, but I'm occasionally running into cases of
path.remove()
throwing error about context:Here's an example from trying to run Nuclide codebase through Babili:
I narrowed it down to a combination of simplify and remove-console plugins, but there might be something else. The source code doesn't have anything unusual; just few expressions with
console.log
andconsole.error
.Temporary solution could be to wrap
path.remove()
in try/catch. Ideal one would be to find out what's causing this and fix it in Babel.The text was updated successfully, but these errors were encountered: