Skip to content
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

React Native Error #127

Open
sayem314 opened this issue Apr 9, 2020 · 6 comments
Open

React Native Error #127

sayem314 opened this issue Apr 9, 2020 · 6 comments

Comments

@sayem314
Copy link

sayem314 commented Apr 9, 2020

Followed install instruction properly and tried basic example but the error is:

image

@bearpeta
Copy link

same problem here

@florenzen
Copy link

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.

@tha23rd
Copy link

tha23rd commented Oct 6, 2020

@florenzen thanks for the workaround!

Would be nice for this to be fixed

@aadsm
Copy link
Owner

aadsm commented Mar 1, 2021

@florenzen do you know if this is an issue with React Native bundling the wrong file?

@florenzen
Copy link

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.

@avi-l
Copy link

avi-l commented May 29, 2022

This is still a problem...

error: Error: While trying to resolve module jsmediatagsfrom fileapp/component/ExtractMetaData.js, the package /node_modules/jsmediatags/package.jsonwas successfully found. However, this package itself specifies amain module field that could not be resolved (/node_modules/jsmediatags/dist/jsmediatags.js`. Indeed, none of these files exist:

  • /node_modules/jsmediatags/dist/jsmediatags.js(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • /node_modules/jsmediatags/dist/jsmediatags.js/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`

There is no jsmediatags.js file in the dist/ directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants