Configuring React Native for Yarn Workspaces

  Рет қаралды 12,975

Ben Awad

Ben Awad

Күн бұрын

Пікірлер: 53
@AGGASGSGASGAS
@AGGASGSGASGAS 5 жыл бұрын
Great video, thanks Ben! for folks having problems with wml on windows, I got it to work by running wml inside WSL ubuntu, and the app worked on the android emulator just fine. (also i didn't need to do the nohoist step for react, i only did it for react-native)
@MehmetNYarar
@MehmetNYarar 5 жыл бұрын
Hey Ben. I was recently beating my head trying to create a monorepo for a universal app. Then I watched your videos and finally got it working. And then I decided to try the new Expo SDK 33. It took just 10 minutes to setup the whole thing :) FYI
@bawad
@bawad 5 жыл бұрын
Awesome!!
@abhi224505
@abhi224505 5 жыл бұрын
Like Ben said had to delete the build folder for windows as well. Thanks Ben.Awesome Work.
@gaos94
@gaos94 6 жыл бұрын
If you get an error sayin something like "root not found" when using wml start, you can try usin watchman watch-del-all and then running again wml start github.com/wix/wml/issues/1
@thomasjohnson1563
@thomasjohnson1563 6 жыл бұрын
I had not heard of the WML package , I must say Wix has nice React Native solutions. I had a situation where I had to configure Webpack to find module dependencies and it was not fun to say the least.
@bawad
@bawad 6 жыл бұрын
yeah Wix has some nice open source projects
@5ervanttechintel_github_io979
@5ervanttechintel_github_io979 5 жыл бұрын
*I feel you..*
@Chocoholic1337
@Chocoholic1337 6 жыл бұрын
Hi Ben! Love the series, I've been following you for a while. I was really really hoping you would setup a CI/CD pipeline, sooner rather than later. Would that be something you'd do in this series?
@bawad
@bawad 6 жыл бұрын
if not in this series, I can do it right afterwards
@Chocoholic1337
@Chocoholic1337 6 жыл бұрын
Ben Awad Excellent! Keep up the great content. Really enjoying it.
@matej-world
@matej-world 6 жыл бұрын
Thanks Ben, this helped a lot, and I was able to set up my own universal app. With some bumps on the road, but it now renders on both web and app. Also for the web package I installed latest react-native package, not the compatible one and it didn't show any errors or problems till now... The only thing I faced I had to downgrade jest version in my app project as web project used lower version.
@bawad
@bawad 6 жыл бұрын
ok, cool
@tabziz
@tabziz 6 жыл бұрын
Hi ben thank you for this series. What is the reason you need to go through so much pain to set this up?
@bawad
@bawad 6 жыл бұрын
just the way react native is right now and we setup a lot of stuff
@Techonsapevole
@Techonsapevole 6 жыл бұрын
@@bawad yeah really a pain exact versions and the rest. And also the errors dont help much. Thanks
@bawad
@bawad 6 жыл бұрын
Did you run into errors?
@simonfoster9426
@simonfoster9426 5 жыл бұрын
@@bawad trying to install my app using 'react-native run-android' I run into following error: Could not get unknown property 'mergeResourcesProvider' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
@bawad
@bawad 5 жыл бұрын
Haven't seen that one before, I have no idea
@yoyobu1666
@yoyobu1666 4 жыл бұрын
could you update the series ?
@chalupagrande
@chalupagrande 4 жыл бұрын
I did this, and now I am unable to link any dependencies to the root node_modules. It says `unable to resolve 'path' from '../../node_modules'`. Despite my double checking that the module is there. Any ideas?
@mohammadfouad6706
@mohammadfouad6706 5 жыл бұрын
Hello Ben, is there any other way to share code between App and Common ?! WML is not working with me :(
@bawad
@bawad 5 жыл бұрын
In the long run it didn't work for me either, until symlinks come out I'm not sure without using expo You can skip this part and do the rest of the tutorial
@joshuabechard6893
@joshuabechard6893 5 жыл бұрын
@@bawad I'm actually happy to hear that I'm not the only one who couldn't get this to work. I'm watching that pull request, but it doesn't look like they are going to approve that one either, the author is talking to someone on that board about the pull request being approved in v60 or v61 and he says, "@fr3fou Unlikely. The people over at Jest want "transparent" symlink support, and this PR relies on an implementation of opaque symlinks. 😖" By the way, thank you for your videos, I always get something out of them.
@JoshuaKisb
@JoshuaKisb 4 жыл бұрын
after 2 days i have officially given up on it. tried various methods and got them working but you try to add nativebase, react-native-elements or other packages and things fall apart. React Native on a whole seems like a big collection of patches. everyone's doing workaround upon workaround. you either use expo or give up. am going back to flutter
@89stoev
@89stoev 5 жыл бұрын
Yo Ben, thanks for your awesome video again. Whats you whole opinion of MobX, is it worth it ?
@bawad
@bawad 5 жыл бұрын
yeah, I like it
@cunningham.s_law
@cunningham.s_law 6 жыл бұрын
can you do a video comparison on package managers like yarn pnpm npm ... and all of their strengths
@bawad
@bawad 6 жыл бұрын
I actually don't know too much about the differences. I haven't tried pnpm, and I tend to use yarn because I've noticed it being a little faster.,
@Maaaaars
@Maaaaars 6 жыл бұрын
Hey Ben! Is there another way to use syslinks for windows environment 6:59 ? When I do wml start it's just hangs and never executes. The link is enabled; added; and the path is correctly identified in linkage but wont run wml start.
@bawad
@bawad 6 жыл бұрын
wml broke for me later on too and I had a hard time getting react native to work with yarn workspaces. Good news is react native will be fixing this soon. I run the web package for the rest of the series, so it's fine to move onto the next part without setting this up right now
@Maaaaars
@Maaaaars 6 жыл бұрын
@@bawad Thanks!
@bantinggamer4962
@bantinggamer4962 5 жыл бұрын
​@@bawad How or what do we do if we want to actually have it work a device? The entire course is react-native-web but now i cant get the react-native part to work. What must happen now to solve this problem?
@bawad
@bawad 5 жыл бұрын
what needs to be solved is getting react native to work with yarn workspaces. You could try this dev.to/brunolemos/tutorial-100-code-sharing-between-ios-android--web-using-react-native-web-andmonorepo-4pej
@bantinggamer4962
@bantinggamer4962 5 жыл бұрын
thanks @@bawad i will check out the link. keep up the good work!
@11octrawal
@11octrawal 5 жыл бұрын
Module `dayjs` does not exist in the Haste module map i am getting this error
@bawad
@bawad 5 жыл бұрын
I'm not sure how to fix that error without github.com/facebook/metro/pull/257 you don't need to setup the react native half for the rest of the tutorial if you want to continue
@rrastakongrrastakong9797
@rrastakongrrastakong9797 4 жыл бұрын
thanks!!
@hokhamis543
@hokhamis543 3 жыл бұрын
Why it looks so complicated?
@zulq2075
@zulq2075 5 жыл бұрын
i installed and link folder with wml but when i run *wml start* in Linux i got this error.*Error: Watchman was not found in PATH.* i followed below facebook.github.io/watchman/docs/install.html but *inotify* seems ok.can you plz tell how can i solve this error.
@bawad
@bawad 5 жыл бұрын
Did you add watchman to your path too
@zulq2075
@zulq2075 5 жыл бұрын
@@bawad you mean this command *wml add ../common ./node_modules/@wow/common* yes!, when i enter *wml list* it is also showing me *enabled (0) /media/zulqarnain/code/practice/reactNativeWeb/packages/common -> /media/zulqarnain/code/practice/reactNativeWeb/packages/app/node_modules/@wow/common*
@bawad
@bawad 5 жыл бұрын
so its working now?
@zulq2075
@zulq2075 5 жыл бұрын
@@bawad nope, same error *path not found*, you can check my repo github.com/theZulqarnain/reactNativeBoilerplate
@bawad
@bawad 5 жыл бұрын
Did you add it to your path?
@MaxPicAxe
@MaxPicAxe 5 жыл бұрын
WML looks very hackish... is there any better way?
@bawad
@bawad 5 жыл бұрын
when this is merged there will be a better way github.com/facebook/metro/pull/257
@alexleung842
@alexleung842 3 жыл бұрын
Now do this without Metro and with Yarn 2 plug n play
How to use Mobx with React Hooks
9:38
Ben Awad
Рет қаралды 32 М.
Setting Up a React Native Web Monorepo
13:46
Ben Awad
Рет қаралды 22 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
React Apollo Yarn Workspace Example
32:01
Ben Awad
Рет қаралды 10 М.
How to Roll Your Own Auth
13:05
Ben Awad
Рет қаралды 127 М.
lazy.nvim explained
14:17
TJ DeVries
Рет қаралды 33 М.
Styling a Component in React Native Web
24:33
Ben Awad
Рет қаралды 4,9 М.
How to Use Lerna
13:24
Ben Awad
Рет қаралды 81 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 244 М.
Want to make a video chat app? Watch this video for WebRTC!
1:22:35
Good Morning Developers
Рет қаралды 53 М.