fs missing from webpack
See original GitHub issuegetting this error
ERROR Failed to compile with 1 errors 21:03:36
This module was not found:
* fs in ./~/request/lib/har.js
To install it, you can run: npm install --save fs
from googling around, it seems some people had success with adding
node: {
fs: "empty"
}
to their webpack config
I tried adding that in next.config.js
without success.
could it be syntax, or is that not the correct file ?
similar issue seen here https://github.com/josephsavona/valuable/issues/9
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Node cannot find module "fs" when using webpack
I'm using node.js and webpack to create a bundle. From what I've read, node.js should contain fs module for managing files.
Read more >Configuration - webpack
dev is an online tool for creating custom webpack configurations. It allows you to select various features that will be combined and added...
Read more >can't resolve 'fs' webpack 5 | The AI Search Engine You Control
This often make problems with bundlers such as Webpack because the bundlers try to resolve all modules in the source code, including require('fs')...
Read more >Missing module error | JavaScript Chart Forums - SciChart
Home Questions Missing module error ... at webpackMissingModule (buildDataSeries.js:15:94) ... Ignore fs should be removed or updated in webpack.config
Read more >Next.js + Webpack - Fix for ModuleNotFoundError: Module not ...
If you're building a Next.js app that uses a Node.js module that only exists on the server-side such as the file system (fs)...
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
This can be solved with adding
config.node = {fs: "empty"};
to your config.