Closed imabhijith25 closed 6 months ago
Are you using webpack 5? it's broken by default, and doesn't automatically include polyfills of core modules.
I guess we are using webpack 5.75. Any way to fix this? It would be much appreciated...
Downgrade to v4, or follow advice in https://medium.com/sindre-sorhus/webpack-5-headache-b6ac24973bf1
I have this error only when I am import crypto from "crypto". Is there any way to not show such build message and that too on linux
The only way is to not use crypto, to use webpack 4, or use the workarounds in that article.
Why does it work in windows and not in linux/ubuntu? Facing same issue here.
webpack@5.75.0 crypto-browserify@3.12.0
@moopmonster i changed the import statement import crypto from "crypto-browserify"
I have a react app with following scripts and also config-overrides In package.json file I have used react-app-rewired
"scripts": { "start": "react-app-rewired start", "build": "react-app-rewired build --max_old_space_size=8192", "test": "react-app-rewired test", "eject": "react-app-rewired eject" },
Also I am using proper config override files config-overrides.js
When I try to build this app on windows its fine but getting the following error on ubuntu server
Also I would like to inform that I am using the depricated crypto library(legacy project) and I am importing it as
inside src/utils/decryptImage.js
Please provide a way to fix this