-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Plain install with defaults displays 404 errors #4449
Comments
Can you check if your anti-virus is blocking something? |
I only use the standard Windows Defender anti-virus, although I do have "Controlled Folder Access" enabled for tighter security, but my dev folder is outside the protected folders so I don't think it should be impacted. I tried disabling my firewall, but it made no difference. A strange thing I noticed is that after running the dev server, the console error leads me to
This appears to be a key part of the issue. So it's obviously finding the file correctly, I'm just not sure why it's delivering plain markdown instead of bundling as JS. 🤔 |
Can you check if vue/vite apps work fine? |
After a couple of hours of troubleshooting this I think I worked out the issue. I created a new blank folder on a different drive and everything worked correctly as expected. I realised that the troublesome dev folder I was working in was inside an NTFS junction (kind of like a symlink), which I suspect Vite cannot traverse/resolve. For example, I was working inside: Sorry to trouble you with the issue. But I guess it's good to document here in case someone else experiences a similar issue in future. It seems to be a problem with Vite, as mentioned in this Svelte issue: sveltejs/kit#3579 I don't think a Vite issue has been raised for this yet. Maybe I will submit one. Will close this issue for now. |
Describe the bug
When creating a plain vanilla
npm install -D vitepress
andvitepress init
, the development site shows a 404 error. This occurs for both the homepage/
and/markdown-examples.html
.I'm using the latest versions of vitepress (1.5.0), node (23.5.0), and npm (11.0.0), on Windows 10.
Reproduction
npm install -D vitepress
npx vitepress init
npm run docs:dev
Unfortunately when I run the exact same commands on Stackblitz, it works perfectly. So it must be something with my environment.
I've tried changing the settings during
vitepress init
to use a subfolder and disable TypeScript, but all variations so far produce the same problem.The following errors are displayed in the browser console:
Expected behavior
I would expect the default homepage to be displayed. Instead a 404 error is shown.
System Info
Additional context
Here is the exact output from my terminal window, starting from an empty folder:
Validations
The text was updated successfully, but these errors were encountered: