Skip to content

[0.28.0] - Native module cannot be null - Cannot find entry file #8449

Closed
@GantMan

Description

@GantMan

Upgrading an app from 0.27.2 to 0.28.0 I get this message in simulator with no stack trace:
image

When I look at packager I get the message:

NotFoundError: Cannot find entry file global code@http://localhost:8081/index.ios.js in any of the roots: ["/Users/gantman/Documents/Projects/rn/MyApp"]
    at DependencyGraph._getAbsolutePath (/Users/gantman/Documents/Projects/rn/MyApp/node_modules/node-haste/lib/index.js:288:13)
    at /Users/gantman/Documents/Projects/rn/MyApp/node_modules/node-haste/lib/index.js:226:30
    at process._tickCallback (node.js:379:9)

It looks like I'm not the only one: http://stackoverflow.com/questions/37999468/entry-file-error-in-react-native-from-packager/38044411

The stackoverflow issue claims this is due to dependencies that cannot handle 0.28.0 - which leads me to wonder what kind of error message would do that?

This is keeping our ignite project from progressing from 0.27.2 to 0.28 -> infinitered/ignite#199

I've been trying to crack this nut for a few days, any feedback/help would be appreciated. I'm currently going to init a new project and add dependencies one at a time to see if I can find the culprit. Not a very fun process, but there doesn't seem to be a clear opportunity otherwise.

Thanks ahead of time for whomever helps.

Activity

ashleydw

ashleydw commented on Jun 27, 2016

@ashleydw

The dependency is probably using require instead of the new import. As in: https://github.com/facebook/react-native/releases/tag/v0.25.1

But strange if it worked in 0.27.2

satya164

satya164 commented on Jun 27, 2016

@satya164
Contributor

Closing since this issue is with a third party module (from the issue you linked to) and it should be filed with that module's repo..

GantMan

GantMan commented on Jun 27, 2016

@GantMan
ContributorAuthor

@satya164 - don't you think the error message should be better? Would that be a different issue to file?

satya164

satya164 commented on Jun 27, 2016

@satya164
Contributor

@GantMan Feel free to open a new issue if you manage to get a reduced test case of this.

JohnyDays

JohnyDays commented on Jul 1, 2016

@JohnyDays
Contributor

Also having this problem, but only on iOS 😢

kfiroo

kfiroo commented on Jul 3, 2016

@kfiroo

I have a similar issue, you guys might have some insight.

My problem is with react-native run-android only, ios runs just fine.

My packager server is running, I can get http://localhost:8081/index.android.bundle in the browser.
When running react-native run-android, the build completes successfully but I get this error in my packager console:

NotFoundError: Cannot find entry file global code@http://10.0.2.2:8081/index.android.js in any of the roots: [...]

the problem is that it seems to look for the index file in 10.0.2.2:8081 instead of localhost:8081.

Any idea where is this defined?

Thanks

GantMan

GantMan commented on Jul 3, 2016

@GantMan
ContributorAuthor

Just to make sure the IP is the problem, neuter your initial screen from all imports outside of RN. If it runs, then it's the same issue we've seen. If it truly is the IP, look into the port/ip forwarding solutions many Android devs have worked with.

JohnyDays

JohnyDays commented on Jul 4, 2016

@JohnyDays
Contributor

For the record, in my case this error was occuring because I had not correctly setup push notifications on my xCode project. As soon as I linked the library, the error disappeared.

TheoGit

TheoGit commented on Aug 30, 2016

@TheoGit

@JohnyDays I'm having same issue; could you please expound a little more on "not correctly setup push notifications on my xCode project" - how would I fix this???

8 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @kfiroo@SandroMachado@ashleydw@GantMan@satya164

      Issue actions

        [0.28.0] - Native module cannot be null - Cannot find entry file · Issue #8449 · facebook/react-native