Help with how to use music-metadata in ts-node with a NextJS source base... #2250
Closed
1 task done
Labels
bug
Bug, will addressed with high priority
Is there an existing issue for this?
music-metadata version
No response
Current Behavior
Context:
I am not sure this is a
music-metadata
issue as I can usemusic-metadata
no problem in my NextJS app. But, I could really use some help or advice and this may be an actual issue too. It might also be an enhancement request.I've read docs and I am far from an expert in the different module loading possibilities/configurations between NextJS and
ts-node
. I'm just looking for some combination of configs or changes to howmusic-metadata
is packaged so I can use it in ts-node as well as NextJS. I understand it supports esm, but perhaps unlike other packages, there is some compatibility with commonjs that I need as well to work with ts-node?I run some
ts-node
command line utilities using some of the same TS library code I wrote for the NextJS app. That normally works fine. But, no matter how I configure ts-node to run, I can't figure out how to getmusic-metadata
to resolve. I do this with no problem with other packages (prisma
, etc).I can attach my
package.json
(includes the script for ts-node) and tsconfig.json.tsconfig.json
package.json
I have a simple code that is
If I use ts to run it I get:
My real desire is to run something like this:
And use my internal lib there which calls
parseStream
. I use this functiongetAudioMetaData
today inside NextJS and it works fine.Below is a copy of my next.config.js file for completeness but I suspect not relevant...
The text was updated successfully, but these errors were encountered: