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

Uncaught DOMException when bundled #63

Closed
Tazeg opened this issue May 3, 2020 · 1 comment
Closed

Uncaught DOMException when bundled #63

Tazeg opened this issue May 3, 2020 · 1 comment

Comments

@Tazeg
Copy link

Tazeg commented May 3, 2020

All works fine in development. When the app is build I get the error :

bundle.js:1 Uncaught DOMException: Failed to execute 'pushState' on 'History': A history state object with URL 'file:///home/jeff/myproject/public/404' cannot be created in a document with origin 'null' and URL 'file:///home/jeff/myproject/public/index.html'.
    at file:///home/jeff/myproject/public/build/bundle.js:1:7764
    at Object.setActive (file:///home/jeff/myproject/public/build/bundle.js:1:7871)
    at Object.setActiveRoute (file:///home/jeff/myproject/public/build/bundle.js:1:11765)
    at file:///home/jeff/myproject/public/build/bundle.js:1:15150
    at e (file:///home/jeff/myproject/public/build/bundle.js:1:68)
    at Array.map (<anonymous>)
    at file:///home/jeff/myproject/public/build/bundle.js:1:2095
    at C (file:///home/jeff/myproject/public/build/bundle.js:1:1487)
    at V (file:///home/jeff/myproject/public/build/bundle.js:1:3079)
    at new target (file:///home/jeff/myproject/public/build/bundle.js:1:631021)

Should I set a default route ? could not find this in your documentation.
And if i set a 404 route with my default component it does'nt solve.

I need a standalone single page application. I mean all should be client side, with no server. I understood it was the aim of svelte-router. So it should work with file protocol. What am I doing wrong ?

@jcschmidig
Copy link

Even an SPA should be served via an HTTP Server. May be a simple one like SIRV (with the singlePage option).

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

No branches or pull requests

3 participants