【发布时间】:2022-01-17 08:20:42
【问题描述】:
我有一个在后端使用 .NET 的 React.js 项目。我切换了计算机,从 git 中提取文件,并期望一切正常。但是我无法启动并运行本地服务器。我收到以下错误:
'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.
【问题讨论】:
-
你安装了 npm 吗?
-
是的,NPM 已安装。
-
我猜 NG 被配置为 http 并且 SpaProxy 试图加载 https。