When I start using vite, the page shows 404
See original GitHub issueDescribe the bug
when I start use npm run dev
, the page shows me 404 but no error
// package.json
{
"dev": "vite",
}
Reproduction
this is my link
https://github.com/HuskyToMa/vue3Component
System Info
vite
version: 1.0.0-rc.9
node
version: 12.16.1
system
: macOS 10.15.3
Optional:
npm
version: 6.13.4
vue
version: 3.0.2 from pacakge-lock.json
@vue/compiler-sfc
version: 3.0.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Vue 3 + Vite dev server returns 404 on page reload of ...
I've isolated the problem to Vite. Everything works fine with Vue CLI. My vite.config.js : import loadVersion from 'vite-plugin-package-version ...
Read more >Troubleshooting - Vite
Syntax Error / Type Error happens. Vite cannot handle and does not support code that only runs on non-strict mode (sloppy mode). This...
Read more >404 error with React Router and gh-pages : r/reactjs - Reddit
Hi friends ! I've been trying to deploy a simple react website on gh-pages. The home page works really fine ! But when...
Read more >Vite Headache - Endless 404 in console - Laracasts
I recently installed a new Laravel project and it now seems to have come with Vite instead of Webpack which is fine but...
Read more >SSR Handling of 404 and 500 Errors - Quasar Framework
quasar/app-vite) Managing the common 404 and 500 HTTP errors in a Quasar ... then we can use Quasar CLI // to display a...
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 FreeTop 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
Top GitHub Comments
thanks for this, unfortunately we have a big project, multiple project references with typescript, tooling etc. copying into one src is a bit problematic. I have managed to get vite working, works well, just seems when i update to the head version now
@vitejs/plugin-vue
has an explicit peer dependency to vue3 that wasn’t there before.Don’t know if it’s relevant here, but I got 404 when starting up the dev server. The problem was that in
vite.config.js
, I had defined this since earlier:because I’m currently migrating my build to vite from Vue2 webpack template (
vue init webpack
), which historically has had that ruled defined to be able to doimport Menu from @/components/Menu
.It made the script
@vite/client
not resolve. I removed this part of the config, find-replaced all @ with src manually and added .vue and .js to all imports, and vite started working again.