Closed LittleWhiteLoti closed 10 months ago
Hi, did you try to reload the page? That can happen if the Vite Dev Server is not ready yet.
@Eptagone Thanks for getting back so quickly.
I tried reloading it and this still happen. I did notice that a console that normally runs the vite server didn't start. Is this not part of the services? Am I missing something.
Mmm, can you access to https://localhost:5173/@vite/client
in the browser?
Did you try to run npm ci
? to clean install que npm packages
I did run npm ci and it just downloaded a few packages. One which was vulnerable by the way.
In the ViteNet.MVC example project whenever I try to visit https://localhost:5173/@vite/client
Firefox
Chrome
Edge
Hi. It's true that there were vulnerable NPM packages. I just updated them. Please let me know if with those changes you can now run the Razor pages example.
Regarding the SSL error in Firefox, I don't know if regenerating the self-signed certificate could help. https://learn.microsoft.com/en-us/dotnet/core/additional-tools/self-signed-certificates-guide
And also, what OS are you using to run the project?
Windows 10 with Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.8.2
Tell me if I'm doing something wrong. These are the steps I'm doing.
This might not be related to your issue @LittleWhiteLoti, but ViteOptionsExtensions.GetViteDevServerUrl does not take ViteOptions.Base into account. So if we configure a subfolder for vite assets, the @vite/client won't load.
@frisksitron did you get it to work? Can you provide an example project that I might look at? I'm trying to get it to work with Vue 3 and vite.
@LittleWhiteLoti basic sample provided works. Vue should also work based on that because everything is JS.
If you are cloning the sample. below worked for me:
npm install npm build npm dev Run ASP.NET (hit F5 on browser if is doesn't load first time)
@Deepfreezed thanks I will test it later
Okay I finally got it to work for the following steps.
Use Visual Studio not visual studio code.
I started up the ViteNet Razor pages from the github repo. Any clue what might be happening. I do have vite 5.03 installed.