ethanent / phin

Node HTTP client
MIT License
576 stars 33 forks source link

ReferenceError: Buffer is not defined #73

Open philosofonusus opened 3 years ago

philosofonusus commented 3 years ago

I think it would be helpful for people who decided to use it on frontend or something else that includes browser... It happens if you use webpack5+

The solution is that you need to add these lines to your webpack config

module.exports = {
  ...
  node: {
    process: true,
    Buffer: true
  }
}