Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Cannot resolve dependencies in webpack 5 #350

Open
codelocksdev opened this issue Jan 12, 2022 · 1 comment
Open

Cannot resolve dependencies in webpack 5 #350

codelocksdev opened this issue Jan 12, 2022 · 1 comment

Comments

@codelocksdev
Copy link

When I try to add this dependency to a web app (made with create-react-app) using webpack 5, I get errors saying that it will not polyfill the node dependencies (url and streams). Is this library not meant to be used in a front end? Can you please update the code/dependencies to work in a browser and with webpack 5?

@iMrDJAi
Copy link

iMrDJAi commented Apr 9, 2022

As far as I remember, you have to add this to your Webpack config:

node: {
    fs: 'empty',
    net: 'empty',
    tls: 'empty',
    // put any other node builtins here
}

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

No branches or pull requests

2 participants