-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Flat routes are broken on macOS (and probably Linux) in 1.12.0 #5324
Labels
Comments
Maybe related to #5322 (the |
haines
added a commit
to haines/remix
that referenced
this issue
Jan 31, 2023
Workaround using patch-package:
diff --git a/node_modules/@remix-run/dev/dist/config/flat-routes.js b/node_modules/@remix-run/dev/dist/config/flat-routes.js
index e3646a7..52c0688 100644
--- a/node_modules/@remix-run/dev/dist/config/flat-routes.js
+++ b/node_modules/@remix-run/dev/dist/config/flat-routes.js
@@ -33,7 +33,7 @@ function flatRoutes(appDirectory, ignoredFilePatterns) {
// fast-glob will return posix paths even on windows
// convert posix to os specific paths
let routePathsForOS = routePaths.map(routePath => {
- return path__default["default"].join(...routePath.split(path__default["default"].posix.sep));
+ return path__default["default"].normalize(routePath);
});
return flatRoutesUniversal(appDirectory, routePathsForOS);
} |
1 task
haines
added a commit
to haines/remix
that referenced
this issue
Jan 31, 2023
haines
added a commit
to haines/remix
that referenced
this issue
Jan 31, 2023
Duplicate of #5322 |
2 tasks
itsMapleLeaf
added a commit
to itsMapleLeaf/charge-worlds
that referenced
this issue
Feb 5, 2023
🤖 Hello there, We just published version Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Remix are you using?
1.12.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Set
future.v2_routeConvention = true
, attempt to build app on macOS.Expected Behavior
Routes are loaded, build succeeds
Actual Behavior
Build breaks when loading routes
Note it is trying to load from
outes
notroutes
!The bug was introduced in #5266. By splitting and rejoining the paths, it drops the leading
/
, converting/Users/me/...
toUsers/me/...
. HoweverappDirectory
still has a leading/
so removing directory prefixes withslice
drops one too many characters.The text was updated successfully, but these errors were encountered: