ping命令在部署后不起作用,尽管它在本地起作用
我的ping应用程序在本地运作良好,但是在部署(Heroku)中,我得到了错误:
命令失败:ping -c 1 google.com/bin/sh:1:ping:找不到
你能解释为什么吗?以及如何解决这个问题?
我在服务器中有一个:
let {stdout, stderr} = await exec(`ping -c ${ req.body.packeges} ${req.body.url}`);
以及发送给客户端的响应。因此,我正在执行服务器中的ping命令(node.js)。
后端:node.js 前端:ReactJS
谢谢
My ping application works perfectly locally, but in deployment (Heroku), I get the error:
Command failed: ping -c 1 google.com /bin/sh: 1: ping: not found
can you explain why? and how to fix this?
I have this in the server:
let {stdout, stderr} = await exec(`ping -c ${ req.body.packeges} ${req.body.url}`);
and the response I send to the client. so I'm doing the ping command in the server (Node.js).
backend: Node.js
Frontend: Reactjs
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论