Skip to content

Unable to run example project #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
nitor-tuomasjaanu opened this issue May 6, 2025 · 3 comments
Closed
1 of 2 tasks

Unable to run example project #833

nitor-tuomasjaanu opened this issue May 6, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@nitor-tuomasjaanu
Copy link

nitor-tuomasjaanu commented May 6, 2025

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? … [email protected]
✔ 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

@nitor-tuomasjaanu nitor-tuomasjaanu added the bug Something isn't working label May 6, 2025
@satya164
Copy link
Member

satya164 commented May 6, 2025

You need to upgrade your Node version to one of these (or higher)

  • 20.19.0
  • 22.12.0
  • 23.4.0

@satya164 satya164 closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2025
@asiaeric
Copy link

asiaeric commented May 8, 2025

@satya164 I changed every node version that you mentioned but still fail

@satya164
Copy link
Member

satya164 commented May 8, 2025

@satya164 I changed every node version that you mentioned but still fail

if you're getting the same error then it means that is still using an old version of node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants