Open sayem314 opened 4 years ago
same problem here
I have the same problem.
The reason is, that - for whatever reason - the jsmediatags.js
file from the dist
directory gets bundled instead of the jsmediatags.js
from the build2
directory of the package. The file from dist
is intended for use in a browser (it says "browser": "dist/jsmediatags.js",
in package.json
) and for React Native, we need the "main": "build2/jsmediatags.js",
.
I was able to workaround the problem by simply removing the browser
line from package.json
. I am completely new to the whole JS world, so I have no clue how to fix this properly.
@florenzen thanks for the workaround!
Would be nice for this to be fixed
@florenzen do you know if this is an issue with React Native bundling the wrong file?
Yes, I assume that RN packages the wrong file. But I don't know how to change the config such that the correct one is picked up.
This is still a problem...
error: Error: While trying to resolve module
jsmediatagsfrom file
app/component/ExtractMetaData.js, the package
/node_modules/jsmediatags/package.jsonwas successfully found. However, this package itself specifies a
mainmodule field that could not be resolved (
/node_modules/jsmediatags/dist/jsmediatags.js`. Indeed, none of these files exist:
There is no jsmediatags.js file in the dist/ directory.
Followed install instruction properly and tried basic example but the error is: