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

[Bug?]: Error with multiple routing group layouts #1173

Closed
2 tasks done
JAD3N opened this issue Dec 22, 2023 · 2 comments
Closed
2 tasks done

[Bug?]: Error with multiple routing group layouts #1173

JAD3N opened this issue Dec 22, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@JAD3N
Copy link

JAD3N commented Dec 22, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

The dev server crashes with this error:

/home/jaden/Projects/my-app/node_modules/@solidjs/start/server/StartServer.tsx:35
          const part = globalThis.MANIFEST[false ? "ssr" : "client"].inputs[segment["$component"].src];
                                                                                   ^

TypeError: Cannot read properties of undefined (reading '$component')
    at eval (/home/jaden/Projects/my-app/node_modules/@solidjs/start/server/StartServer.tsx:35:84)

Expected behavior 🤔

Both groups should work.

Steps to reproduce 🕹

Steps:

  1. bunx create-solid@latest
  2. bun i
  3. Add 2 routing groups with a test route in each at the same level (in my example I called them group1, group2 and test1, test2).
  4. Add 2 nested route files (group1).tsx and (group2).tsx in the routes folder.
  5. bun run dev
  6. Navigate to (group1)/test1.tsx route /test1 and it'd load fine.
  7. Navigate to (group2)/test2.tsx route /test2 and it'd crash.

Context 🔦

I'm trying to have different layouts for different sections of a site (i.e. auth and main site etc).

Your environment 🌎

No response

@JAD3N JAD3N added the bug Something isn't working label Dec 22, 2023
@birkskyum
Copy link
Contributor

birkskyum commented Dec 23, 2023

Could be a https://github.com/solidjs/solid-router bug?

@JAD3N
Copy link
Author

JAD3N commented Dec 23, 2023

Could be a https://github.com/solidjs/solid-router bug?

If I make a small tweak to the file that causes the crash, the page loads the correct route. So my best guess is that when the Solid Start server is collecting assets to send it's trying to access the wrong group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants