SPA server for localhost not working, can't find localhost

Viewed 2460

I have a React.js project utilizing .NET in the backend. I switched computers, pulled the files from git, and expected things to run fine. However I am unable to get the local server up and running. I get the following error:

'SKGVT.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.1\System.Net.WebSockets.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SKGVT.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.1\System.Threading.Tasks.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Microsoft.AspNetCore.SpaProxy.SpaProxyLaunchManager: Error: Couldn't start the SPA development server with command 'npm start'.
Microsoft.AspNetCore.SpaProxy.SpaProxyLaunchManager: Information: No SPA development server running at https://localhost:44449 found.
The thread 0x6108 has exited with code 0 (0x0). ```

It seems like its a fault with the localhost URL, but I cant figure out where I change this.
1 Answers

I'm not sure if you resolved this but I too was running into it. For me the issue was that my setupProxy.js expected me to be using SSL.

I "fixed" this by commenting out the target in setupProxy.js and replacing it with the http://localhost:PROXYPORTHERE.

HTH someone :)

Related