vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.39k stars 1.84k forks source link

[turborepo] Add react-native to monorepo #2775

Closed wmonecke closed 1 year ago

wmonecke commented 1 year ago

What version of Turborepo are you using?

latest

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Mac

Describe the Bug

Hello guys,

I am having a hard time adding react-native to my turborepo starting template.

What I've done:

Created a new monorepo using npx create-turbo@latest cd into apps and start a new react-native project called "mobile" (i.e. npx react-native init mobile) It just throws an error that it is unable to find some packages. I see that some packages which should be in the mobile/node-modules directory are now at the root node_modules.

What am I doing wrong here? I cant seem to find a RN starter without expo.

Expected Behavior

I expect to be able to add a bare RN project to a turborepo managed monorepo

To Reproduce

  1. Create a new turbo repo project - npx create-turbo@latest
  2. Add a new empty RN project - cd ./apps && npx react-native init mobile
  3. See error

Reproduction Repo

No response

tknickman commented 1 year ago

Hey! This is related to yarn workspaces, not Turborepo. Turborepo is just a task runner.

Check this out https://classic.yarnpkg.com/blog/2018/02/15/nohoist/