Adding a polyfill for the missing crypto module

308 views Asked by At

I am trying to set up mysql database to use it with React, but I am getting multiple errors for Connection.js, Protocol.js, Timer.js, Query.js: -Can't resolve 'crypto' -Can't resolve 'net' -Can't resolve 'tls'.

I installed modules and I created in root webpack.config.js with fallbacks. The one in react-scripts was too complex for me and I didn't know what to change it. I added in package.json this: "scripts": { "start": "react-scripts start --config ./path/to/webpack.config.js",

The webpack file I created is ignored by React. Is there a way to apply fallbacks in this way? What can I do to fix this? None of the other answers helped.

0

There are 0 answers