世界上最伟大的投资就是投资自己的教育
Guanine
id 13604
Guanine 14 hours 27 minutes 45 seconds 舵主 研究生
-
我改成最开始的写法,然后 network 里面 response 给提示是:Proxy error: Could not proxy request /api/users from localhost:3001 to https://localhost:6070/ (EPROTO).``` javascript
"proxy": "https://localhost:6070" -
并不能这么写,会报错,报错还是刚刚的错误:When specified, "proxy" in package.json must be a string.
Instead, the type of "proxy" was "object".
Either remove "proxy" from package.json, or make it a string. -
我照着您给的图片中的截图这么写,会有报错,错误提示是:When specified, "proxy" in package.json must be a string.
Instead, the type of "proxy" was "object".
Either remove "proxy" from package.json, or make it a string.我写成这个样子: "proxy":"http://localhost:6070",
"secure":false 在 package.json 中,报错和之前一样,response 中还是没有内容 -
我选的就是红色的,连续这三个都是红色,response 中都没有内容。
-
-
我重启了,执行了 npm start ,启动成功,这次端口在http://localhost:3001/signup,但是后台还是得不到数据,控制台没有输出,页面也不报错...
-
我就改了端口在 index.js 中监听的也是 6070,app.listen(6070, () => console.log('Running on localhost:6070'));package.json 中代理的也是 6070,"proxy": "http://localhost:6070"这有什么问题吗,为什么后端不显示我已经请求的数据?
-
-
您说的这个是要改哪里的内容,后端的代码我都是直接复制的您给的视频下方的?什么科学上网?
© 汕尾市求知科技有限公司 | Rails365 Gitlab | Qiuzhi99 Gitlab | 知乎 | b 站 | 搜索
粤公网安备 44152102000088号 | 粤ICP备19038915号
Top