Borewit / music-metadata-browser

Browser version of music-metadata parser Supporting a wide range of audio and tag formats.
MIT License
240 stars 21 forks source link

ReferenceError: Buffer is not defined #953

Closed ViktorMachine closed 4 months ago

probityrules commented 5 months ago

I was able to fix this (when using webpack) by adding

const
    webpack = require('webpack');

...

plugins: [
    new webpack.ProvidePlugin({
      Buffer: ['buffer', 'Buffer'],
    }),
    new webpack.ProvidePlugin({
      process: 'process/browser'
    }),
    ....

to webpack.config.js and running npm install buffer. (Also required "process" to get up and running, so I appended that here too.)

Borewit commented 4 months ago

Same as #417