Getting missing `exportDefaultFrom` plugin error with `babel` parser, even though it's in `.babelrc`
See original GitHub issueSimilar to #256 , in that I’m using Babel parser (not Babylon, because that doesn’t actually result in all the modifications I’m expecting to see).
Using both local npx jscodeshift
and global install.
The Transform is getting interpreted fine, it’s just the Parser is having trouble with my sources (so #245 is not relevant)…
I just get this:
ERR src/components/WipeContainer/index.js Transformation error (This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7))
SyntaxError: This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7)
at Object.raise (~/.config/yarn/global/node_modules/@babel/parser/lib/index.js:3834:17)
at Object.expectPlugin (~/.config/yarn/global/node_modules/@babel/parser/lib/index.js:5147:18)
at Object.parseExport (~/.config/yarn/global/node_modules/@babel/parser/lib/index.js:8209:12)
I’ve tried different --parser-config jscodeshift.config.json
contents (as JSON, as module.exports
, using "plugins": ["exportDefaultFrom"]
vs the normal .babelrc
format, etc), but the CLI help mentions that this is only for Flow or Babylon.
Here’s my .babelrc
(which I’d expect gets picked up by jscodeshift
since I can’t seem to supply a config any other way?):
{
"presets": [
"env",
"react"
],
"plugins": [
"transform-object-rest-spread",
"transform-export-default"
]
}
Babel transpilation works fine. It just seems that jscodeshift isn’t picking up on my config?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top GitHub Comments
Is there a fix for this? This is quite blocking.
If @fkling is recommending removing babel, should we be going in this direction?