The errors are originating from the nextjs file /node_modules/next/dist/compiled/gzip-size , and not from my personal code, nor installed deps.
And to confirm, rolling back to v13.3 these errors aren't present.
I've tried clearing cache, removing node_modules, fresh install with no change in the error.
Here is the full console error:
ERROR in ./node_modules/next/dist/compiled/gzip-size/index.js 1:2832-2845
Module not found: Error: Can't resolve 'fs' in '/Users/jake/Development/personal/elkli-and-hart/node_modules/next/dist/compiled/gzip-size'
ERROR in ./node_modules/next/dist/compiled/gzip-size/index.js 1:2878-2895
Module not found: Error: Can't resolve 'stream' in '/Users/jake/Development/personal/elkli-and-hart/node_modules/next/dist/compiled/gzip-size'
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/next/dist/compiled/gzip-size/index.js 1:2928-2943
Module not found: Error: Can't resolve 'zlib' in '/Users/jake/Development/personal/elkli-and-hart/node_modules/next/dist/compiled/gzip-size'
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 }