Closed isiah-lloyd closed 1 year ago
It looks like you need to configure rollup to use the browser version. There is a NodeJS and browser version of this library, and the error your getting is from the NodeJS specific files that should not be used in a browser environment.
Here's where the browser version is exported. https://github.com/eshaz/icecast-metadata-js/blob/1dfbfcef639fec76166a4c71b79e22a8e6ab339d/src/icecast-metadata-js/package.json#L15
You might try adding this to your rollup configuration. https://stackoverflow.com/a/73342503/14911733
@isiah-lloyd I just want to follow up and see how this is going. Did my suggestion above help?
@eshaz hey there! thanks for following up! been a bit busy but definitely want to get this library working for my Steam Deck radio player.
I tried using the {browser: true}
option for the resolve rollup plugin and it fixes #148 (I assume that means it's now using the browser.js
entry point instead of index
.) But I still get the above errors when trying to build the rollup starter project with this library.
Ok, I found the problem. I'm using the web-worker
library to implement the Worker api in a Node JS environment in a few of my other dependencies used by icecast-metadata-player
. Unfortunately, this block in their package.json
is not compatible with the rollup-resolve {browser: true}
option.
I'll work on getting a fix released here soon.
I've just released icecast-metadata-player/1.13.2. This should fix the error you were getting. Let me know how it goes!
@eshaz It's working now! Thanks.
Tried testing this library using Rollup and this starter project. First ran into issue #148, after manually adding IcecastReadableStream to the exports, I get the following informational messages while building:
And when attempting to load in the browser: