-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Followed the steps that are described on README but with no success. As seen on other tutorials I created webpack.config.js file on the root directory. Added the code lines to call the plugin as said on the README but still got the 23 errors. Also searched in node_modules/react-scripts/config/webpack.config.js and added the piece of code from README. Searched for module.exports but it doesn't appear as it shows on many tutorials. It appears like:
// This is the production and development configuration. // It is focused on developer experience, fast rebuilds, and a minimal bundle. module.exports = function (webpackEnv) { const isEnvDevelopment = webpackEnv === 'development'; const isEnvProduction = webpackEnv === 'production';
Any help will be much appreciated because I've tried everything what I found on internet. Downgrading webpack, using react-app-rewired,...
Nothing is working. Thought that this solution could fix the problem as it seems more concise. But no success.
Here the errors:
`Compiled with problems:X
ERROR in ./node_modules/body-parser/lib/read.js 24:11-26
Module not found: Error: Can't resolve 'zlib' in '/home/zaesar/Escritorio/coding/Github/webpack-intallation-exercise/webpack-installation-exercise/node_modules/body-parser/lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
- install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "zlib": false }
ERROR in ./node_modules/content-disposition/index.js 19:15-39
Module not found: Error: Can't resolve 'path' in '/home/zaesar/Escritorio/coding/Github/webpack-intallation-exercise/webpack-installation-exercise/node_modules/content-disposition'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
ERROR in ./node_modules/cookie-signature/index.js 4:13-30
Module not found: Error: Can't resolve 'crypto' in '/home/zaesar/Escritorio/coding/Github/webpack-intallation-exercise/webpack-installation-exercise/node_modules/cookie-signature'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
ERROR in ./node_modules/destroy/index.js 15:17-41
Module not found: Error: Can't resolve 'fs' in '/home/zaesar/Escritorio/coding/Github/webpack-intallation-exercise/webpack-installation-exercise/node_modules/destroy'
ERROR in ./node_modules/destroy/index.js 17:13-30
Module not found: Error: Can't resolve 'stream' in '/home/zaesar/Escritorio/coding/Github/webpack-intallation-exercise/webpack-installation-exercise/node_modules/destroy'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/destroy/index.js 19:11-26
Module not found: Error: Can't resolve 'zlib' in '/home/zaesar/Escritorio/coding/Github/webpack-intallation-exercise/webpack-installation-exercise/node_modules/destroy'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
...`