Babel throws "Plugin/Preset files are not allowed to export objects, only functions."
See original GitHub issuelingui 2.0.4, babel 7.0.0-beta.40
> lingui extract --clean
Extracting messages from source files…
/code/App/node_modules/@babel/core/lib/config/config-descriptors.js:158
throw new Error("Plugin/Preset files are not allowed to export objects, only functions.");
^
Error: Plugin/Preset files are not allowed to export objects, only functions.
at createDescriptor (/code/App/node_modules/@babel/core/lib/config/config-descriptors.js:158:11)
at /code/App/node_modules/@babel/core/lib/config/config-descriptors.js:101:12
at Array.map (<anonymous>)
at createDescriptors (/code/App/node_modules/@babel/core/lib/config/config-descriptors.js:100:27)
at createPresetDescriptors (/code/App/node_modules/@babel/core/lib/config/config-descriptors.js:92:10)
at /code/App/node_modules/@babel/core/lib/config/config-descriptors.js:64:19
at presets (/code/App/node_modules/@babel/core/lib/config/config-descriptors.js:54:25)
at mergeChainOpts (/code/App/node_modules/@babel/core/lib/config/config-chain.js:294:68)
at /code/App/node_modules/@babel/core/lib/config/config-chain.js:247:7
at buildRootChain (/code/App/node_modules/@babel/core/lib/config/config-chain.js:83:20)
There’s a closed issue mentioning something like this: https://github.com/lingui/js-lingui/issues/163
The difference is that I actually updated to 2.0.4 from 2.0.0 and got this error (while the author of issue#163 had an opposite situation - he was getting this on 2.0.2 and it was “fixed” and updated to 2.0.4)
Any ideas how to fix that?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:27 (17 by maintainers)
Top Results From Across the Web
Preset files are not allowed to export objects - Stack Overflow
js Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions. Does anyone know how to solve this?
Read more >Plugin/Preset files are not allowed to export objects ... - GitHub
Module build failed: Error: [BABEL] /Users/kukuchong/yunshipei/dawn/src/index.js: Plugin/Preset files are not allowed to export objects, only functions.
Read more >React Native: Plugin/Preset files are not allowed to export ...
React Native: Plugin/Preset files are not allowed to export objects, only functions · You shouldn't be using both expo and react-native presets.
Read more >Plugin/Preset files are not allowed to export objects, only ...
Hi there! When I running any tests, i getting: Error: Plugin/Preset files are not allowed to export objects, only functions.
Read more >Getting "Error: Plugin/Preset files are not allowed to export ...
[Solved]-Getting "Error: Plugin/Preset files are not allowed to export objects, only functions." from babel-preset-react-app/index.js-babel.js.
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 FreeTop 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
Top GitHub Comments
@adamgruber Absolutely. I’m planning releasing new version using Babel 6 with new major version using Babel 7 (even in beta). I’m just fixing some Babel-related issues, so once it’s ready, I’m gonna publish it.
I have the exact same issue