Anyone can help resolve this error? I have tried resolving using polyfills and every other solution i could find online and think by myself but i still keep getting the issues
I also encountered this issue when using node-fetch: ^3.0.0 but downgrading to node-fetch: ^2.0.0 resolved it for me.
You need to declare these as externals. https://webpack.js.org/configuration/externals/
Webpack 4
target: node
Webpack 5
externalsPresets: { node: true },
I also use webpack-node-externals but this might not apply in your case.
Related issue: https://github.com/webpack/webpack/issues/13290
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With