Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.
See original GitHub issueHi I try to deploy my app to production using sirve public --host 0.0.0.0
but I get Caught exception while replacing the current page. If you’re running this in the Svelte REPL, please note that the replace
method might not work in this environment.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
How to use the Svelte REPL • REPL • Svelte
You can edit this. Select the 'How to use the Svelte REPL' text and try renaming it to 'My first REPL app'. Over...
Read more >TypeScript support in Svelte - Learn web development
You'll need a terminal with node and npm installed to compile and build your app. Objective: Learn how to configure and use TypeScript...
Read more >Command Line | Meteor API Docs
Run a meteor development server in the current project. Searches upward from the current directory for the root directory of a Meteor project....
Read more >ReferenceError: fetch is not defined - javascript - Stack Overflow
If you're using a version of Node prior to 18, the fetch API is not implemented out-of-the-box and you'll need to use an...
Read more >Typeerror is not a function typescript - Seba Online
This error happens when JavaScript can't find the setState() function from ... a button or another component to change the state of your...
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
I figured the issue. It’s not the server.
In your
App.svelte
:This is causing a redirection loop when the app is compiled for production. The reason is that when the code is minified, the class name changes and it’s not
Principal
anymore. This doesn’t happen in development because the code isn’t minified.How you can fix it: rather than relying on
event.detail.name
, pass custom user data (see: https://github.com/ItalyPaleAle/svelte-spa-router/blob/master/Advanced Usage.md#route-pre-conditions )What I need to do: document that the name of the component might be different when minification runs, so users shouldn’t rely on that
this is my code https://gitlab.com/xellCoders.go/nebulaadmin