Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Route with address "/client/" is not working #1142

Closed
MrSrsen opened this issue Apr 2, 2020 · 3 comments · Fixed by #1307
Closed

Route with address "/client/" is not working #1142

MrSrsen opened this issue Apr 2, 2020 · 3 comments · Fixed by #1307

Comments

@MrSrsen
Copy link

MrSrsen commented Apr 2, 2020

Describe the bug
When I use /client/* route in Sappers file-system routing I am getting plain text error not found.

To Reproduce

  1. Launch Sapper in dev mode (I didn't test this with other then dev)
  2. Create file in /routes/client/new.svelte with some content
  3. Visit this route in browser as localhost:3000/client/new
  4. You will see mentioned plain text error

Expected behavior
I see contents of new.svelte page.

Information about your Sapper Installation:

  • Sapper: 0.27.9
  • Svelte: 3.13
  • Browser: Firefox 74.0
  • OS: Kubuntu 18.04

Severity

Low - annoying.

Additional context

I think this is because of /client native Sappers files that are automatically generated by compilation but if this is the case i think some compile-time error or warning would be appropriate.

If this is intended behavior I think this needs to be documented in the docs. I didn't see any "reserved" route names there (https://sapper.svelte.dev/docs/).

@MrSrsen MrSrsen changed the title Route with address "/client/ is not working Route with address "/client/" is not working Apr 2, 2020
@antony
Copy link
Member

antony commented Apr 2, 2020

Confirmed. And your supposition is correct!

@Conduitry
Copy link
Member

I believe this would be fixed by changing the exception handling here to call next() to continue with the next middleware rather than immediately returning a 404.

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

Successfully merging a pull request may close this issue.

4 participants
@antony @MrSrsen @Conduitry and others