react-native-reusables icon indicating copy to clipboard operation
react-native-reusables copied to clipboard

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

Open gokul1099 opened this issue 1 year ago • 19 comments
trafficstars

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.

gokul1099 avatar Apr 18 '24 16:04 gokul1099

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

mrzachnugent avatar Apr 18 '24 19:04 mrzachnugent

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 ?

itsyashsahu avatar Apr 19 '24 04:04 itsyashsahu

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.

rickychan0611 avatar Apr 19 '24 04:04 rickychan0611

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

mrzachnugent avatar Apr 19 '24 20:04 mrzachnugent

@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

itsyashsahu avatar Apr 20 '24 13:04 itsyashsahu

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:

  • Windows 10
  • NodeJS v20.10.0
  • npm 10.5.0
  • yarn 1.22.22
  • expo 50.0.17

It gets stuck here:

image

Alejandro-M-Cruz avatar Apr 20 '24 15:04 Alejandro-M-Cruz

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

rickychan0611 avatar Apr 21 '24 02:04 rickychan0611

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

a0m0rajab avatar Apr 27 '24 20:04 a0m0rajab

any updates?

ndarcode avatar May 22 '24 08:05 ndarcode

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.

mrzachnugent avatar May 22 '24 12:05 mrzachnugent

same bug

SHIXUNXUN avatar Jun 13 '24 15:06 SHIXUNXUN

same issue

baptlma avatar Jun 20 '24 03:06 baptlma

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?

shawnmclean avatar Jun 26 '24 22:06 shawnmclean

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

mrzachnugent avatar Jun 26 '24 23:06 mrzachnugent

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

a0m0rajab avatar Jun 27 '24 05:06 a0m0rajab

I uploaded a temporary solution to this here

guibzo avatar Aug 08 '24 12:08 guibzo

@guibzo Work like charm, just used It

tripolskypetr avatar Aug 18 '24 16:08 tripolskypetr

I also making a research about running the best react-native ui kit starter app. Found a little mistake in starter-base. After the nativewind fix, the build will continue failing

See https://github.com/mrzachnugent/react-native-reusables/pull/212

@mrzachnugent

tripolskypetr avatar Aug 18 '24 16:08 tripolskypetr

Check this patch: https://github.com/nativewind/nativewind/pull/860#issuecomment-2371839082

manssorr avatar Sep 24 '24 17:09 manssorr