Skip to content

The npm run dev preview of the Vite project failed #6888

Answered by code-asher
sanbei101 asked this question in Q&A
Discussion options

You must be logged in to vote

Your application needs to be configured to prepend the proxy path to its requests (/proxy/5173/ in your case) or it needs to make the requests relatively. Currently it is making requests against the root, which is not right.

You might also have to use /absproxy/5173 instead, depending on how the application is configured. I am not familiar enough with Vite to say, but you can read #4541 (comment)

If you can, use the subdomain proxy instead. It avoids these types of issues.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sanbei101
Comment options

Answer selected by sanbei101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants