Skip to content

[0.83] Fix exception in codegen when dependency is not found #1181

@tido64

Description

@tido64

Target Branch

0.83

Link to commit or PR to be picked

facebook/react-native#54665

Description

Fixed an ENOENT exception when a dependency does not export package.json, and your repo is set up as a monorepo using pnpm.

Note

This does not fix the actual search algorithm. We shouldn't be using require.main.paths here because it does not point to the correct starting point, the project root.

This change only fixes the case where we cannot find package.json at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type Pick RequestPick requests to include commits inside a React Native release

    Type

    No type

    Projects

    Status

    Done / Picked

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions