0

Been getting a couple of errors that I cant seem to resolve. I was testing out my react app and suddenly received a couple of errors that I cant seem to resolve.

ERROR in ./node_modules/body-parser/lib/read.js 19:11-26 Module not found: Error: Can't resolve 'zlib' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/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/body-parser/lib/types/urlencoded.js 201:12-34 Module not found: Error: Can't resolve 'querystring' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/body-parser/lib/types'

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: { "querystring": require.resolve("querystring-es3") }' - install 'querystring-es3' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "querystring": false } ERROR in ./node_modules/cookie-signature/index.js 5:13-30 Module not found: Error: Can't resolve 'crypto' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/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 '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/destroy' ERROR in ./node_modules/destroy/index.js 17:11-26 Module not found: Error: Can't resolve 'zlib' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/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: { "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/etag/index.js 20:13-30 Module not found: Error: Can't resolve 'crypto' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/etag'

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/etag/index.js 21:12-31 Module not found: Error: Can't resolve 'fs' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/etag' ERROR in ./node_modules/express/lib/application.js 22:11-26 Module not found: Error: Can't resolve 'http' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/express/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: { "http": require.resolve("stream-http") }' - install 'stream-http' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "http": false } ERROR in ./node_modules/express/lib/request.js 17:11-30 Module not found: Error: Can't resolve 'net' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/express/lib' ERROR in ./node_modules/express/lib/request.js 19:11-26 Module not found: Error: Can't resolve 'http' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/express/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: { "http": require.resolve("stream-http") }' - install 'stream-http' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "http": false } ERROR in ./node_modules/express/lib/response.js 20:11-26 Module not found: Error: Can't resolve 'http' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/express/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: { "http": require.resolve("stream-http") }' - install 'stream-http' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "http": false } ERROR in ./node_modules/express/lib/utils.js 23:18-40 Module not found: Error: Can't resolve 'querystring' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/express/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: { "querystring": require.resolve("querystring-es3") }' - install 'querystring-es3' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "querystring": false } ERROR in ./node_modules/express/lib/view.js 17:9-22 Module not found: Error: Can't resolve 'fs' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/express/lib' ERROR in ./node_modules/mime/mime.js 2:9-22 Module not found: Error: Can't resolve 'fs' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/mime' ERROR in ./node_modules/parseurl/index.js 14:10-24 Module not found: Error: Can't resolve 'url' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/parseurl'

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: { "url": require.resolve("url/") }' - install 'url' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "url": false } ERROR in ./node_modules/safe-buffer/index.js 3:13-30 Module not found: Error: Can't resolve 'buffer' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/safe-buffer'

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: { "buffer": require.resolve("buffer/") }' - install 'buffer' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "buffer": false } ERROR in ./node_modules/safer-buffer/safer.js 5:13-30 Module not found: Error: Can't resolve 'buffer' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/safer-buffer'

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: { "buffer": require.resolve("buffer/") }' - install 'buffer' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "buffer": false } ERROR in ./node_modules/send/index.js 22:9-22 Module not found: Error: Can't resolve 'fs' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/send' ERROR in ./node_modules/serve-static/index.js 20:10-24 Module not found: Error: Can't resolve 'url' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/serve-static'

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: { "url": require.resolve("url/") }' - install 'url' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "url": false }

If there is any insight or if you can point me in the right direction I will greatly appreciate it!

  • Hi thank you so much for that! It did solve the majority of it but still receiving a couple of errors like: Module not found: Error: Can't resolve 'querystring' *for both express and body-parser* Module not found: Error: Can't resolve 'url' in '/Users/rubymajano/Desktop/josuecodes main/josue-codes/node_modules/parseurl' Module not found: Error: Can't resolve 'buffer' Module not found: Error: Can't resolve 'util' Module not found: Error: Can't resolve 'url' – Josue Majano Apr 22 '23 at 00:13

0 Answers0