Module not found can't resolve 'fs' in node_modules\tempa-xlsx
See original GitHub issueWe tried updating react-scripts from 4.0.3 to 5.0.0 with react-data-export 0.6.0 and xlsx 0.17.2, and when we try to build it fails with the error Module not found: Error: Can't resolve 'fs' in react-data-export\node_modules\tempa-xlsx
What fix needs to be applied to maintain react-scripts version 5.0.0? Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:7
Top Results From Across the Web
Can't resolve 'fs' in react-script - Stack Overflow
Edit: I just found out that I can't create Excel files anymore. After some research, it seems that 'fs' (which is used to...
Read more >Module not found: Can't resolve 'fs' error [Solved] | bobbyhadz
The error "Module not found: Error: Can't resolve 'fs'" occurs because there has been a breaking change in Webpack version 5. To solve...
Read more >module not found: can't resolve 'fs' in - You.com
1 Answer. Sorted by: 1. fs is a nodeJs only module. When you run "ng serve" your app will be compiled and run...
Read more >Module not found: Error: Can't resolve 'fs' - Laracasts
hi, when run gulp get error not found fs module // depend fs let dir = require('node-dir'); //or let fs = require('fs'); dir.path(__dirname,...
Read more >[Gatsby, Storyblok] "Can't resolve 'fs' in x" - DEV Community
ERROR #98124 WEBPACK Generating development JavaScript bundle failed Can't resolve 'fs' in '/Users/.../node_modules/dotenv/lib' If you're ...
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
I’m having this problem too. I made the build work by adding this lines to the ‘resolve’ field of webpack.config.js file (which is located in node_modules/react-scripts/config):
fallback: { "fs": false, "crypto": false },
Of course, this is a temporary fix.
The problem can be fixed definitively by replacing tempa-xlsx with xlsx in the package’s source code. I’ll try to make a pull request fixing it soon.
I switched from NPM to YARN and everything works perfectly. NPM has a lot of problems, try switching to YARN if you can. Maybe it can solve your problem