简体   繁体   English

无法从localhost:3000代理请求到localhost:7000 ReactJs

[英]Could not proxy request from localhost:3000 to localhost:7000 ReactJs

I provided an api to my react app, it was working fine, but suddenly it stopped working. 我为我的反应应用程序提供了一个api,它工作正常,但突然它停止了工作。 in my client (React app) package.json 在我的客户端(React app)package.json

"proxy": "http://localhost:7000"

now it tell me this error message: Could not proxy request /api/users/signup from localhost:3000 to http://localhost:7000 . 现在它告诉我这个错误消息:无法从localhost:3000代理请求/ api / users / signup到http:// localhost:7000 thanks in advance. 提前致谢。

Maybe you created a socket and didn't free the port afterwards ? 也许你创建了一个套接字并且之后没有释放端口? This may happen if your app crashes. 如果您的应用崩溃,可能会发生这种情况。 When you launch it again, the port may be occupied and unavailable, it happened to me a few times. 当你再次启动它时,端口可能被占用并且不可用,它发生在我身上几次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ReactJS无法代理从localhost:3000到localhost:3003的请求 - ReactJS could not proxy request from localhost:3000 to localhost:3003 reactjs expressjs如何设置代理? 代理不适用于localhost:3000,但适用于localhost:3000 / test - reactjs expressjs how to setup proxy? proxy doesn't work with localhost:3000, but works with localhost:3000/test 从localhost:3000 / admin到localhost:3000 - From localhost:3000/admin to localhost:3000 ECONNREFUSED 用于从本地主机到另一个本地主机的代理请求 - ECONNREFUSED for proxy request from localhost to another localhost 使用代理目标将用户从 localhost:3000 带到 localhost:3000/auth/google 不起作用 - taking the user from localhost:3000 to localhost:3000/auth/google using proxy target is not working 我如何将 http post 请求从 localhost:5000 发送到 localhost:3000 - how can i send http post request from localhost:5000 to localhost:3000 使 localhost/... 弹出 localhost:3000/ - Make localhost/… popup localhost:3000/ 将 localhost:3000 重定向到 localhost:3000/newpage - Redirecting localhost:3000 to localhost:3000/newpage reactjs.env 将 localhost:3000 添加到我的 axios 路径 - reactjs .env add localhost:3000 to my axios path 使用 CRA 创建 reactjs 应用程序时,Localhost:3000 在 windows 中无法正常工作 - Localhost:3000 is not working properly in windows while creating a reactjs app with CRA
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM