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

Unable to use with Webpack 5 #148

Closed
3zzy opened this issue Dec 15, 2020 · 4 comments
Closed

Unable to use with Webpack 5 #148

3zzy opened this issue Dec 15, 2020 · 4 comments

Comments

@3zzy
Copy link

3zzy commented Dec 15, 2020

Webpack 5 doesn't include node polyfills anymore so I'm having issues using the library.

Error: nodebuffer is not supported by this browser

error

I already tried this in my Webpack config:

resolve: {
    fallback: {
        fs: false,
        path: require.resolve("path-browserify"),
        buffer: require.resolve("buffer")
    }
}

and even setting these to false but no luck.

@3zzy
Copy link
Author

3zzy commented Dec 23, 2020

So I installed the node-polyfill-webpack-plugin and now there's a different error:

TypeError: r.isBuffer is not a function

error

@calvinmetcalf
Copy link
Owner

any chance you can show non minified stack trace ?

@3zzy
Copy link
Author

3zzy commented Dec 24, 2020

@calvinmetcalf Sure

Screen Shot 2020-12-24 at 11 56 14 am

error

@calvinmetcalf
Copy link
Owner

this comment suggests you may have to do

new webpack.ProvidePlugin({
  Buffer: ['buffer', 'Buffer'],
})

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

2 participants