Skip to content

Unable to run example project #833

@nitor-tuomasjaanu

Description

@nitor-tuomasjaanu

Description

Description

I am unable to run unmodified package generated by create-react-native-library.

After creating the package with the tool and running yarn, I try to run yarn example ios with following result:

➜  my-awesome-project git:(main) ✗ yarn example ios
Starting project at /Users/tuomasjaanu/code/my-awesome-project/example
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/tuomasjaanu/code/my-awesome-project/example/node_modules/react-native-monorepo-config/index.js from /Users/tuomasjaanu/code/my-awesome-project/example/node_modules/react-native-builder-bob/metro-config.js not supported.

Packages

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

Selected options

✔ What is the name of the npm package? … react-native-my-awesome-project
✔ What is the description for the package? … Minimal package to demonstrate react-native library
✔ What is the name of package author? … Tuomas Jaanu
✔ What is the email address for the package author? … tuomas.jaanu@nitor.com
✔ What is the URL for the package author? … https://google.com
✔ What is the URL for the repository? … https://google.com
✔ What type of library do you want to develop? › JavaScript library
✔ Project created successfully at my-awesome-project!

Link to repro

https://github.com/nitor-tuomasjaanu/react-native-my-awesome-project

Environment

System:
OS: macOS 15.4.1
CPU: (8) arm64 Apple M3
Memory: 210.89 MB / 24.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.10.0
path: ~/.nvm/versions/node/v22.10.0/bin/node
Yarn:
version: 3.6.1
path: /opt/homebrew/bin/yarn
npm:
version: 11.2.0
path: ~/.nvm/versions/node/v22.10.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.14.3
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 21.0.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: latest
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.2
wanted: 0.79.2
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions