Cannot be compiled with Babel 7
See original GitHub issueHello, I get the following error trying to import
the aws-sdk
module in my react app.
ERROR in ../node_modules/aws-sdk/lib/event_listeners.js
Module not found: Error: Can't resolve 'util' in 'myproject-root/node_modules/aws-sdk/lib'
The app is compiled using @babel/core@7.1.2
and babel-loader@8.0.4
which are the last version on babel cores and loader.
Tried the same thing in another project using @babel/core@6.6.5
and babel-loader@7.1.2
and all works just fine.
Any idea? Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:20 (10 by maintainers)
Top Results From Across the Web
babel 7 can't compile in node_modules · Issue #8672 - GitHub
v7 Regression Describe the regression I'm upgrade my webpack from babel6 to babel7, but i get a unexpected result when using babel7。
Read more >Why is Babel 7 not compiling node_modules files?
New in Babel 7.x, Babel has as concept of a "root" directory, which defaults to the current working directory. For project-wide configuration, ...
Read more >Upgrade to Babel 7
In Babel 6, values passed to Babel directly (not from a config file), were resolved relative to the files being compiled, which led...
Read more >Babel vs. TypeScript: Choosing the right compiler for your ...
Should you use Babel? TypeScript? Both? See how the two JavaScript compilers compare through performance, custom transformations, and more.
Read more >@babel/helper-compilation-targets - npm
Helper functions on Babel compilation targets. Latest version: 7.20.7, last published: 4 days ago.
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
it solved my problem too…thanks guys 💯
@simonemazzoni
Thanks for working with us on this issue. I’m going to close this out. Appreciate the help.