Dev server don't autodiscover new routes
See original GitHub issueDescribe the bug
If the dev server is running, SvelteKit don’t see newly added routes, and result in 404 when navigating to them.
Reproduction
- Create a new project (
npm init svelte@next my-app
+ select theSkeleton project
, should also be true for demo app) - Install the project (
npm install
) - Start the dev server (
npm run dev
) - Add a new page in
src/routes
(ex:src/routes/test.svelte
) - Try to navigate to the route (with the previous example:
http://localhost:3000/test
)
Logs
// Server console side
09:50:09 [vite] page reload .svelte-kit/dev/generated/manifest.js
// Browser side
404
Not found: /test
Error: Not found: /test
at render_page (file:///private/tmp/sk/my-app/node_modules/@sveltejs/kit/dist/ssr.js:1318:11)
at async resolve (file:///private/tmp/sk/my-app/node_modules/@sveltejs/kit/dist/ssr.js:1663:12)
at async respond (file:///private/tmp/sk/my-app/node_modules/@sveltejs/kit/dist/ssr.js:1614:10)
at async Immediate.<anonymous> (file:///private/tmp/sk/my-app/node_modules/@sveltejs/kit/dist/chunks/index.js:3458:22)
System Info
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 78.90 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.16.1 - /opt/local/bin/node
Yarn: 1.22.10 - /opt/local/bin/yarn
npm: 6.14.8 - /opt/local/bin/npm
Browsers:
Safari: 14.1.2
npmPackages:
@sveltejs/kit: next => 1.0.0-next.139
svelte: ^3.34.0 => 3.41.0
Severity
serious, but I can work around it
Additional Information
The file .svelte-kit/dev/generated/manifest.js
is correctly generated.
But SvelteKit don’t seem to reload it (it is only load at here: .svelte-kit//dev/runtime/internal/start.js
)
A simple workaround is to stop and restart server every times a new route is created, in DX point of view it’s not ideal
_Initial Discord message: https://discord.com/channels/457912077277855764/819723698415599626/870925145554952222_
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:5
Top Results From Across the Web
Autodiscover not working on internal network - TechNet
First question, it shows external email address for user, is that supposed to be? It doesn't need to go outside. The external domain...
Read more >Best practice: Enabling autodiscovery - BlackBerry Docs
2013 and 2016) environment: Make sure that the autodiscover URL routes to the latest version of the CAS servers (for example, the. Microsoft...
Read more >Overview of the virtual server and link auto-discovery ... - AskF5
When a BIG-IP GTM system performs auto-discovery, only virtual servers within the route domain being queried will be discovered. Beginning in ...
Read more >CSRF being triggered on all routes · Issue #10750 - GitHub
I recently discovered that CSRF protection is triggered on all routes over POST. To me, this seems a little strange.
Read more >How to disable autodiscover/autodiscover.xml? - cPanel Forums
Disabling the option server-wide would keep the DNS records from being created in the future. If you don't want the DNS records for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
same here, seems to be more so for server endpoints consistently
am using Typescript in case that is the common denominator (if maybe other people don’t have the issue)
Same here.
Changes to existing routes work fine, and are rendered near instantly, but if I add a new route file it isn’t detected and gives a 404 error. If I exit the dev server and reload it picks up the changes. This occurs with both the Demo and Skeleton projects. I’ve search around a bit and tried adding some vite specific changes to set usePolling to true, but to no effect.