Skip to content

react-native-builder-bob >= 0.28.0 generate package.json in the lib with {"type":"module"} content #621

@mskorenkyi

Description

@mskorenkyi

Description

After upgrading the version of the react-native-builder-bob to the latest version, I encountered an issue where the builder started generating a package.json file with content {"type":"module"} in the output directory (in my case, in lib). Upon investigation, I discovered that these changes were responsible for this behavior.

Unfortunately, I was unable to find any option to prevent the creation of the package.json in the output directory. The only solution I found was to manually remove it from my end after the build was completed by react-native-builder-bob.

Packages

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

Selected options

Below is my react-native-builder-bob config.

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

Link to repro

https://github.com/mskorenkyi/BobIssue/

Environment

System:
  OS: macOS 14.2.1
  CPU: (8) arm64 Apple M1 Pro

Binaries:
  Node:
    version: 20.12.2
    path: ~/.nvm/versions/node/v20.12.2/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.12.2/bin/yarn
  npm:
    version: 10.8.1
    path: ~/.nvm/versions/node/v20.12.2/bin/npm

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