Skip to content
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

v4 - iOS Expo Project failing to archive #751

Closed
iceColdChris opened this issue Jan 19, 2024 · 2 comments
Closed

v4 - iOS Expo Project failing to archive #751

iceColdChris opened this issue Jan 19, 2024 · 2 comments

Comments

@iceColdChris
Copy link

Describe the bug
When trying to archive the application within XCode to push to the app store, The build fails and I am met with the following error

tailwindcss(native) rebuilding...
Error running TailwindCSS CLI, please run the CLI manually to see the error.

When running the CLI manually I am not met with any error and the command runs successfully, Normal builds also seem to be working just fine, It's just failing on the archive step. I was able to reproduce this on a fresh expo project as well.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Expo Tabs Project using npx create-expo-app@latest --template tabs@50
  2. Follow the Nativewind v4 instructions for expo-router
  3. Open up the iOS project in XCode using the xcworkspace file
  4. Select any ios device for the target
  5. Click Product -> Archive
  6. After a while the build will fail and the error message will point to the above error

Expected behavior
The App should archive as intended

Screenshots
Screenshot 2024-01-19 at 8 27 26 AM

Additional context

Node version: 20.10.0 via nvm
XCode 15.2

packages:
"expo": "~50.0.2",
"nativewind": "^4.0.1",
"react-native-reanimated": "~3.6.0",
"tailwindcss": "^3.4.1"

@promer94
Copy link

promer94 commented Jan 24, 2024

After adding some log at https://github.com/marklawlor/nativewind/blob/4232087bd2405e8d9b42979fcda429b5ddaa2a49/packages/nativewind/src/metro/tailwind-cli.ts#L107

20240124-221415
20240124-221422

I find the real error is that the current node executable is installed in a directory that's not in Xcode's default search path.

https://andrewchaa.me.uk/how-to-fix-the-node-command-not-found-error-when-building-a-react-native-app-in-xcode/

@iceColdChris
Copy link
Author

That ended up working for me, Thank you @promer94!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants