Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack 5 Dependencies #38

Open
GeoMarkou opened this issue Apr 27, 2022 · 0 comments
Open

Webpack 5 Dependencies #38

GeoMarkou opened this issue Apr 27, 2022 · 0 comments

Comments

@GeoMarkou
Copy link

I'm receiving a lot of errors when trying to build:

ERROR in ./node_modules/pngjs-nozlib/lib/parser-async.js 4:11-26 Module not found: Error: Can't resolve 'zlib' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/parser-sync.js 4:11-26 Module not found: Error: Can't resolve 'zlib' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/png.js 3:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'
ERROR in ./node_modules/contentstream/index.js 18:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'
ERROR in ./node_modules/contentstream/node_modules/readable-stream/lib/_stream_readable.js 35:9-39 Module not found: Error: Can't resolve 'events' in 'C:\REDACTED'
ERROR in ./node_modules/get-pixels-frame-info-update/dom-pixels.js 3:20-35 Module not found: Error: Can't resolve 'path' in 'C:\REDACTED'
ERROR in ./node_modules/gif-encoder/lib/GIFEncoder.js 11:13-30 Module not found: Error: Can't resolve 'assert' in 'C:\REDACTED'
ERROR in ./node_modules/gif-encoder/lib/GIFEncoder.js 12:19-49 Module not found: Error: Can't resolve 'events' in 'C:\REDACTED'
ERROR in ./node_modules/gif-encoder/lib/GIFEncoder.js 14:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'
ERROR in ./node_modules/gif-encoder/node_modules/readable-stream/lib/_stream_readable.js 35:9-39 Module not found: Error: Can't resolve 'events' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/chunkstream.js 4:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/filter-parse-async.js 3:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/packer-async.js 3:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/packer-sync.js 4:11-26 Module not found: Error: Can't resolve 'zlib' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/packer.js 7:11-26 Module not found: Error: Can't resolve 'zlib' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/parser-async.js 3:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/parser-async.js 4:11-26 Module not found: Error: Can't resolve 'zlib' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/parser-sync.js 4:11-26 Module not found: Error: Can't resolve 'zlib' in 'C:\REDACTED'
ERROR in ./node_modules/pngjs-nozlib/lib/png.js 3:11-26 Module not found: Error: Can't resolve 'util' in 'C:\REDACTED'

They all suggest a similar course of action:

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: { "util": require.resolve("util/") }'
        - install 'util'

This kind of sucks, I don't want to have to install a bunch of node.js stuff and add webpack overhead just to use this in the browser, my build times are already slow enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant