🐛 wrong babel usage
See original GitHub issueI don’t know is that a bug report or my mistake, but whole day today I’m struggling and get different behavior from time to time.
This is my .babelrc
{
"presets": [
"env",
"stage-1",
"react"
],
"plugins": ["transform-react-jsx"],
"ignore": [
"node_modules"
]
}
and this is the message what I see
Server running at http://localhost:1234
🚨 /.../node_modules/attr-accept/dist/index.js: [BABEL] /.../node_modules/attr-accept/dist/index.js: Using removed Babel 5 option: /.../node_modules/attr-accept/.babelrc.stage - Check out the corresponding stag at Logger.error (/.../node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/.../node_modules/babel-core/lib/transformation/file/options/option-manager.js:220:20)
at OptionManager.init (/.../node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/.../node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/.../node_modules/babel-core/lib/transformation/file/index.js:135:24)
at JSAsset.getParserOptions (/.../node_modules/parcel-bundler/src/assets/JSAsset.js:60:20)
at <anonymous>
that happens when I use react-dropzone package. Looks like that parcel/babel transpile node_modules as well?
here is my package.json
"dependencies": {
"prop-types": "15.6.0",
"react": "16.1.0",
"react-dom": "^16.2.0",
"react-dropzone": "4.2.3",
"react-pdf": "2.5.2"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-1": "6.24.1",
"cross-env": "^5.1.1",
"enzyme-adapter-react-16": "^1.1.0",
"eslint": "4.14.0",
"eslint-config-airbnb": "16.1.0",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-react": "7.5.1",
"jest": "^21.2.1",
"node-sass": "^4.7.2",
"parcel-bundler": "^1.1.0",
"prettier": "^1.9.1"
}
as soon as I don’t use that package everything is ok.
parcel --version
1.4.1
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:15 (4 by maintainers)
Top Results From Across the Web
FAQ - Babel.js
Babel assumes that all input code is an ES2015 module. ES2015 modules are implicitly strict mode so this means that top-level this is...
Read more >Why you don't need Babel - LogRocket Blog
In 2020, frontend developers are still wasting a lot of time with excessive tooling. Babel is seen by some as a necessity, but...
Read more >Problems with babel loader in react-create-app - Stack Overflow
I got the same problem. I solved it by removing folder node_modules in User/ and file package-lock.
Read more >metro-react-native-babel-preset - npm
Babel presets for React Native applications. React Native itself uses this Babel preset by default when transforming your app's source code.
Read more >Solving Babel issue in Ejected React Application - Medium
After ejecting from the React application, when you try to run the application locally you will get a JavaScript error saying that it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

In v1.6.0, we no longer transpile node_modules by default. Closing.
I’ve also encountered this problem. Im trying to create some starter app with react and material-ui. With the latest version parcel is working great. But when I want to use material-ui@next the problem with babelrc shows up. There are multiple packages in nodemodules that contains Babelrc file which parcel tries to ctranspile and this is causing crash preventing my app to run. After deleting all Babelrc files from modules app successfully starts up bit then there are some problem with importing components from material-ui 😦