-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parseFile() function doesn't exist #2144
Comments
As written in the README, parseFile() is exclusively available for Node.js engines. So for sure this not available in React running in your browser. For parsing a File in your browser, you can use the parseBlob(). I have 0 experience with Tauri + React. If Tauri covers the backend, using some kind of Node.js engine, Tauri should be able to give you access to Node.js specific functions. If it does not, you need to raise your issue there. |
Hi @Borewit. I'm facing the exact same problem after updating from Mine is a Node.js app which was working with the mentioned version but breaks with Thoughts? |
Hello @joacoespinosa, I cannot reproduce your problem, I can only proof ![]() Reference: https://onecompiler.com/nodejs/42jznqj9u |
music-metadata version 8 & 9 are Pure ESM packages, while version 7 is CommonJS. To be able to use music-metadata version 8 or 9:
To be able to import
|
Is there an existing issue for this?
music-metadata version
9.0.1
JavaScript module eco system
ECMAScript modules (ESM), music-medata ≥ version 8
Current Behavior
I'm using Tauri + React (ts).
I've installed the module, when I try to import the parseFile() function I get the error:
Module '"music-metadata"' has no exported member 'parseFile'.ts(2305)
There is also no
parseFile()
defined incore.d.ts
I'm importing it like this:
import { parseFile } from "music-metadata";
"type": "module",
inpackage.json
Expected Behavior
I could import
parseFile()
by doingimport { parseFile } from "music-metadata";
and then useparseFile()
Attached audio sample?
The text was updated successfully, but these errors were encountered: