Skip to content
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

Unable to run expo example project: Unable to resolve "react" from "example/src/App.tsx" #687

Open
1 of 2 tasks
AnnaClaudiaSacute opened this issue Nov 15, 2024 · 2 comments
Labels

Comments

@AnnaClaudiaSacute
Copy link

Description

Can not run the example expo project after create a new library with command npx create-react-native-library@latest awesome-library in version 0.44.1

Steps to reproduce:

  • Create a new library using the command: npx create-react-native-library@latest awesome-library
  • Enter inside folder: cd awesome-library
  • Install dependencies: npm i
  • Enter inside example folder: cd example
  • Start metro: npm start
  • See error on console

Image

Packages

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

Selected options

✔ What is the name of the npm package? … ui-library
✔ What is the description for the package? … Test ui library component creation
✔ What is the name of package author? … Anna
✔ What is the email address for the package author? … [email protected]
✔ What is the URL for the package author? … https://github.com/AnaClaudiaSac
✔ What is the URL for the repository? … https://github.com/AnaClaudiaSac/ui-library
✔ What type of library do you want to develop? › JavaScript library
✔ Project created successfully at ui-library!

Link to repro

N/A

Environment

MacOS: 12.7.6
Node: 22.11.0
create-react-native-library: 0.44.1

@AnnaClaudiaSacute AnnaClaudiaSacute added the bug Something isn't working label Nov 15, 2024
@GabrielGomesBarbosa
Copy link

Same here!

@satya164
Copy link
Member

Hey @AnnaClaudiaSacute, the generated project uses yarn by default (see CONTRBUTING.md). If you want to use npm, you may have to do some additional changes. If it still doesn't work with yarn, please share a repro to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants