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

fix: renderRouter on windows #24674

Merged
merged 2 commits into from
Oct 11, 2023
Merged

fix: renderRouter on windows #24674

merged 2 commits into from
Oct 11, 2023

Conversation

marklawlor
Copy link
Contributor

@marklawlor marklawlor commented Sep 29, 2023

Why

Fix: #24493
Fix: https://linear.app/expo/issue/ENG-10196

How

Metro expects all paths to be posix, but the require.context ponyfill keeps the windows separators. This PR ensures the filenames use posix seperators

Test Plan

Tested using the repo provided in the linked issue on windows 11.

Checklist

@linear
Copy link

linear bot commented Sep 29, 2023

ENG-10196 Routing fails with renderRouter on Windows

This issue was automatically imported from GitHub: #24493

Issue accepted by mark


Summary:

  • The user is facing an issue where routing to 'content' fails for tests on a Windows environment. The same tests pass successfully on Linux.
  • The issue is apparent when using renderRouter. When performing tests, the routing failure leads to an 'Unmatched Route' result. However, when running the app on a device, everything appears to work as intended.
  • The user provides the error message that occurs when the test fails, suggesting the source of the issue may be related to routing.
  • In a larger project, they also experience a warning message that includes \\ in paths, which could suggest a problem with path handling on Windows.
  • The same problem does not occur on Linux, suggesting that this is a platform-specific issue.

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Sep 29, 2023
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Sep 29, 2023
@EvanBacon EvanBacon merged commit 5137588 into main Oct 11, 2023
8 of 9 checks passed
@EvanBacon EvanBacon deleted the marklawlor/router/24493 branch October 11, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint compatible bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Routing fails with renderRouter on Windows
3 participants