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

Missing "Main" in package.json #497

Closed
Danlong13579 opened this issue Apr 4, 2023 · 1 comment
Closed

Missing "Main" in package.json #497

Danlong13579 opened this issue Apr 4, 2023 · 1 comment

Comments

@Danlong13579
Copy link

Screenshot

sadly im under an NDA and can not provide a screen shot on the project but did confirm that added the code below allows RN projects to bundle.

Description

React-Native 71 project, metro bundler can not resolve module.
Package.json has no "Main" entry which then looks for a index file in the root of the project which does not exist

we are currently patching 5.2.0 package.json to contain the code bellow

{
  "main": "./build/esm/index.js",
}

Reproduction Steps/Repo Link

React native 71 project
install graphql-request
install pods
build app
error happens at bundle

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

No branches or pull requests

2 participants