背景:
? ? ? ? 通過VSCode運行前端本地項目,運行成功后打開本地鏈接:http://1x.xxx.x.xxx:9803/?,發現打開的頁面重定向到404:http//1xx.xxx.x.xxx:9803/404;
并且控制臺出現:Failed to load resource: the server responded with a status of 404 (Not Found)
解決方案:
打開CDM輸入:netstat -ano|findstr "9803"
如果出現這種情況:
就輸入:cd c:\WINDOWS\system32\
再輸入:netstat -ano|findstr "9803"
找到后面4位數的進程號通過命令結束進程
輸入:taskkill /F /pid 5528
執行完上面的步驟,重啟一下項目就可以了。