Skip to content

Automatic inclusion of package.json breaks Next SSG #625

@tjzel

Description

@tjzel

Description

After bumping react-native-builder-bob in Reanimated monorepo, our example app using Next stopped building with a very obscure error.

Errors screenshots

Screenshot 2024-09-08 at 13 21 12

Screenshot 2024-09-08 at 13 19 44

Obviously this file doesn't have any instances of global and it worked well before the bump.

After investigation turns out the culprit is enforced addition of package.json into the build directory added in

I don't exactly understand why is that causing the error, especially that the error message and the callstack itself don't provide any useful information.

Packages

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

Selected options

 {    "source": "src",
    "output": "lib",
    "targets": [
      "module",
      "typescript"
    ]
  }

Link to repro

https://github.com/software-mansion/react-native-reanimated/tree/main/apps/next-example

Environment

Irrelevant, since it breaks in GitHub actions as well.

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