mrzachnugent / react-native-reusables

Universal shadcn/ui for React Native: Copy, paste, and tailor components to suit your specific requirements.
https://rnr-docs.vercel.app
MIT License
2.25k stars 91 forks source link

[ NativeWind Bug ] The web platform does not work on windows #131

Open gokul1099 opened 2 months ago

gokul1099 commented 2 months ago

I have existing react native project, How can i use react-native-reusable? How can i do the initial configuration to use the cli later to add needed components. I have gone through the docs, looks like some sub sections in installation sections are missing.

mrzachnugent commented 2 months ago

Hi @gokul1099,

On the Initial Setup page, you can select the 'Manual Installation" tab.

Then, you can use the CLI to add components to your project. You can use npx @react-native-reusables/cli@latest add, then it will prompt you with the type of project you are working with (universal or native-only), with the location of your /components and /lib folders, then you can select the components you want to add to your project. It will, then, add the files and dependencies (if any).

Is is possible that there are sections that are missing information. Could you please provide the exact cases please? That way I could fix it

itsyashsahu commented 2 months ago

Hi @mrzachnugent I am trying to use the official repo starter base to make the universal react app. I am following the steps mentioned in the docs but still the metro bulid gets stuck without throwing an error.

Can you please help me with this ?

rickychan0611 commented 2 months ago

Hi @mrzachnugent I am trying to use the official repo starter base to make the universal react app. I am following the steps mentioned in the docs but still the metro bulid gets stuck without throwing an error.

Can you please help me with this ?

I have the same problem.

mrzachnugent commented 2 months ago

Hey @itsyashsahu @rickychan0611,

I am going to try it on my side and document the steps I am taking here.

  1. git clone https://github.com/mrzachnugent/react-native-reusables.git
  2. cp -R react-native-reusables/apps/starter-base/ ./my-project
  3. cd my-project && npm install
  4. npm run ios
  5. I ran into this error which seems to be an npm issue: "Error: EMFILE: too many open files, watch" so I deleted the node_modules and ran npm install once again
  6. Then it worked.

Let me know if you this fixes your issue.

Screenshot 2024-04-19 at 4 46 04 PM
itsyashsahu commented 2 months ago

@mrzachnugent I am doing the same steps just running it for the web.

  1. git clone https://github.com/mrzachnugent/react-native-reusables.git
  2. cp -R react-native-reusables/apps/starter-base/ ./my-project
  3. cd my-project && npm install
  4. npm run web

then it gets stucked at a point. I tried it multiple times

if i run the same on the android it works fine

Alejandro-M-Cruz commented 2 months ago

Hi, I'm having the same issue as @itsyashsahu. The starter project seems to work fine on Android, but when running on web it gets stuck while bundling. No error message or anything, the terminal just freezes. I have tried with both npm and yarn. At least in my case, the issue is only on Windows 10. I have tried on macOS and everything works fine.

System details:

It gets stuck here:

image

rickychan0611 commented 2 months ago

It is indeed a problem within nativewind v4. I discovered a pull request in Nativewind's repository and tested it out. I can confirm that it no longer gets stuck on Windows with the correction. However, the pull request has not been merged yet. https://github.com/marklawlor/nativewind/pull/860/commits/59847eb4358efde93cf93a55b5a60812f7661917

a0m0rajab commented 2 months ago

Related PR link: https://github.com/marklawlor/nativewind/pull/860

ndarcode commented 1 month ago

any updates?

mrzachnugent commented 1 month ago

any updates?

For updates, you can check the pull request on NativeWind's Github repo: https://github.com/marklawlor/nativewind/pull/860

When it is solved, I will close this issue.

SHIXUNXUN commented 3 weeks ago

same bug

baptlma commented 2 weeks ago

same issue

shawnmclean commented 1 week ago

As native-wind is no longer maintained, I have switched to tailwind-react-native-classnames. It is also much faster

https://github.com/nativewind/nativewind/pull/860#issuecomment-2132776255

is going nativewind a good route at this time?

mrzachnugent commented 1 week ago

is going nativewind a good route at this time?

Yes, I am betting on it. The sole maintainer had taken a break but he now has a team behind him and they are working hard. Here's the latest update https://x.com/danstepanov/status/1806107770799968673?s=46&t=tpxUSfNj59WG9Y3VDKw5sQ

a0m0rajab commented 1 week ago

Thanks for the update Zach, they had a simple announcement on the v4 issue just for future reference: https://github.com/nativewind/nativewind/issues/600