yarn add @roll-network/apiThe library uses better-queue that is a browser compatible Node package. It requires util to be installed when used within browser environment.
If you use create-react-app, you have to
- Install craco.
- Update
package.jsonto usecracoinstead ofreact-scriptsin thescriptssection. - Create a new
craco.config.jsfile with the following content:
module.exports = {
webpack: {
configure: {
resolve: {
fallback: {
util: require.resolve("util"),
},
},
},
},
};