-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Can't install / run in Yarn workspace #340
Comments
I'm not familiar with yarn workspaces yet, can you investigate and try to resolve? I won't have time to look into it for a bit. |
I have found that I can create it elsewhere, then move it (except I cant successfully run |
@justinobney did you ever get this to work? I'm starting on a big project where I'll have several common packages and also a couple of apps in packages that will use the common code and have yet to get it to work with CRA and yarn workspaces. |
@justinobney How did you fix the hoisting of the native node_modules like 'react-native' etc (context: the I didn't get it work without using lerna and ended up creating my own yarn installer script for now. Note: There are people working on adding a |
In case anyone is stuck with this and until the different issues are fixed, I made a little guide on how to use yarn workspaces with Create React App and Create React Native App (Expo) to share common code across. Hope you find it handy! |
@brentvatne This still isn't working. It would be real nice if it could be resolved. I think all that needs to change is how Exp looks for react native. |
Please reopen since this is still a problem. |
Hey everyone, I figure since I opened this issue then I should resolve it. The trick is a recent feature of yarn workspaces, root package.json
I hope this helps anyone out there. More info |
Description
When I create a Yarn workspace and try to use create-react-native-app in it it installs all of the initial dependencies and hoists them to the root directory, but then it errors.
If I create the app in another folder outside of the project and copy/paste the contents back into the workspace and run
yarn install
everything seems to run ok, but thenyarn start
doesn't work.Expected Behavior
Running
create-react-native-app
in a Yarn workspace should install and run without errors with hoisted dependenciesObserved Behavior
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts
:npm ls react-native
:npm ls expo
:node -v
:v8.2.1
npm -v
:5.3.0
yarn --version
:0.27.5
watchman version
:Please specify a target and action
Reproducible Demo
repro
The text was updated successfully, but these errors were encountered: