0👍
✅
Please post your complete code to the question, or a github repository. Otherwise it’s hard to guess what’s your issue.
If I had to guess – your http-server
can’t find scan.html
because it doesn’t exist. You have a few options:
- Use
hash mode
which won’t require the/scan
url and rely on/index.html#scan
instead. - Use a node-js server with defined routes that go to your html page. Or just send all of them to the same page. Here’s an example https://github.com/ubershmekel/redditp/blob/1e9a659bcc34fa2f2dc28deb552b6702a1173cc1/app.js#L12
- Use Nuxt or do something like Nuxt does – build all the html files so you can still use a static server like
http-server
. See https://nuxtjs.org/guide#static-generated-pre-rendering- For example you can copy yourindex.html
toscan.html
manually.
Source:stackexchange.com