Skip to content

Cannot read property 'useContext' of null #912

Closed

Description

@vinils

Description

problem happened after changing default project to return an element ("Text") mainly on windows

Image Image

i tested it in different enviroments and OS. was able to make it work only 1 version of ubuntu

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

Image

Link to repro

notpublished

Environment

@react-native-community/cli": "latest"
nvm -v 1.2.2
npm -v 11.6.2
yarn -v 1.22.22

Activity

  1. vinils commented on Dec 2, 2025

    @vinils
    Author

    the problem happens its been deployed with react, and react-native on devDependecies of package.json.
    Removing it will fix it

  2. vinils commented on Dec 6, 2025

    @vinils
    Author

    after digging deeper the problem happened because of different react and react-native dependecies since they are being used in dev and peer dependencies at the same time

  3. satya164 commented on Dec 10, 2025

    @satya164
    Member

    I have released a new version that should fix this on Windows. You can try upgrading react-native-builder-bob and react-native-monorepo-config packages in your project.

  4. vinils commented on Jan 11, 2026

    @vinils
    Author

    Tested on 0.56.1. All good! Much appreciate @satya164

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions