-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 '__esModule' of null #927
Comments
The example repo has the structure:
{
"babel": {
"presets": "env"
}
} Removing this part solves the issue. (Seems like an issue with parcel) |
I get same error, with this in my package.json:
|
Just hit the same bug with the latest version. The bug happens only when Babel config is placed in |
Since all other babel tooling can use either (including babel-register, babel-cli, webpack with babel-loader, etc) it might make sense for parcel to follow suit. Putting my babel-config in package.json is a nice way to cut down on the number of config files in a project, and simplify configuration. I do this with everything that supports it (for example with jest, eslint, etc) and it means that I only have one file for all the meta/build info for a project. It's a small thing, but coupled with webpack's new sensible defaults, it made me move away from parcel for new projects, and back to webpack, in it's no-config setup. This seems related to (or maybe a duplicate of) #762 |
Would be nice if this was supported. I'm using a very minimal setup for a project and the only dotfile hanging around is |
I'm also getting this error even with my babel config in I'm running parcel version I followed the instructions exactly at https://parceljs.org/transforms.html#babel as well. |
I'm getting this error as well. I've tried using parcel build, watch and serve, all seem to have the error at some point.
I do have my babel config in the package.json, but it looks like this is supported by parcel in v1.8.1 which I'm using (but not on master?): https://github.com/parcel-bundler/parcel/blob/v1.8.1/src/transforms/babel.js#L205-L207 I'm working on an open source project, and the error occurs in this tree: https://github.com/sj26/notygems/tree/parcel-bundler-parcel-issues-927 (The setup is derived from of a combination of create-react-app-parcel 💩, and react-parcel-example.) (Parcel is amazing, thank you! 💖) |
Getting a little further, it looks like the babel plugin list is changing on recompilation. My compile works fine the first time, but breaks on subsequent recompiles (using watch, etc). The first time, the plugin list reported from here looks like:
Next time, it's:
is the babel config being reparsed against itself, and keeps appending or something? Maybe this is trouble in the preset? |
Fixed by #1515 |
Choose one: 🐛 bug report
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
when i edit my source codes it should be rebuild successfully (but not).
😯 Current Behavior
💁 Possible Solution
Perhaps it's connected to:
💻 Code Sample
ref: https://github.com/willin/i18n/tree/561e4703c23e95709337abdfdbba3903a5061fa3
🌍 Your Environment
The text was updated successfully, but these errors were encountered: