You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'fs' package is just a placeholder because 'fs' is a built-in Node function, but this package looks for an 'fs' package which causes webpack compilation to fail. Specifically it says: Module not found: Error: Can't resolve 'fs' in 'C:\Users\...\node_modules\wordlist-english' [1] ERROR in ./node_modules/wordlist-english/index.js 3:10-23
I have tried numerous solutions suggested online such as editing webpack config, package.json and env variables, as well as using patch-package to point this package to 'fs-extra' or 'graceful-fs' instead. The last solution is the only one that made any difference, but that led to issues with 'graceful-fs' and 'jsonfile' that couldn't be fixed by patch-package so it's really not viable. I also tried adding node: { fs: 'empty' } to webpack.config.js instead of having "browser": { "fs": false } in my package.json - no joy.
Screenshots
To Reproduce
I'm using create-react-app v5.0.1, Node v18.18.0, and webpack v5.88.2
Description
'fs' package is just a placeholder because 'fs' is a built-in Node function, but this package looks for an 'fs' package which causes webpack compilation to fail. Specifically it says:
Module not found: Error: Can't resolve 'fs' in 'C:\Users\...\node_modules\wordlist-english'
[1] ERROR in ./node_modules/wordlist-english/index.js 3:10-23
I have tried numerous solutions suggested online such as editing webpack config, package.json and env variables, as well as using patch-package to point this package to 'fs-extra' or 'graceful-fs' instead. The last solution is the only one that made any difference, but that led to issues with 'graceful-fs' and 'jsonfile' that couldn't be fixed by patch-package so it's really not viable. I also tried adding
node: { fs: 'empty' }
to webpack.config.js instead of having"browser": { "fs": false }
in my package.json - no joy.Screenshots
To Reproduce
I'm using create-react-app v5.0.1, Node v18.18.0, and webpack v5.88.2
package.json
webpack.config.js
The text was updated successfully, but these errors were encountered: