Closed not-matt closed 4 months ago
Thanks for your work on this library. This isn't necessarily an issue with this library but worth documenting.
Leaving this here in case it helps anyone in future.
ReferenceError: Buffer is not defined MpegParser MpegParser.js:218
To fix, I used vite-plugin-node-polyfills
My vite config:
import { defineConfig } from "vite"; import { svelte } from "@sveltejs/vite-plugin-svelte"; import { nodePolyfills } from "vite-plugin-node-polyfills"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [nodePolyfills(), svelte()], resolve: { alias: { src: "/src" } } });
Maybe get rid of Buffer Borewit/token-types#650
Duplicate of #417, and probably many more complains about difficulties poly-filling Node Buffer
You may try music-metadata ≥ 9 , which is guaranteed Buffer free.
Thanks for your work on this library. This isn't necessarily an issue with this library but worth documenting.
Leaving this here in case it helps anyone in future.
To fix, I used vite-plugin-node-polyfills
My vite config: