admin管理员组文章数量:1419199
I'm trying to connect to the API Mailchimp but I have this error that e when I launch the app.js
.
import mailchimp from "@mailchimp/mailchimp_marketing";
mailchimp.setConfig({
apiKey: "apiKey",
server: "server",
});
async function run() {
const response = await mailchimp.ping.get();
console.log(response);
}
run();
And here is the plete error:
(node:27226) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 0.0.0.0:443
at TCPConnectWrap.afterConnect [as onplete] (net.js:1144:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:27226) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see .html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27226) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I'm trying to connect to the API Mailchimp but I have this error that e when I launch the app.js
.
import mailchimp from "@mailchimp/mailchimp_marketing";
mailchimp.setConfig({
apiKey: "apiKey",
server: "server",
});
async function run() {
const response = await mailchimp.ping.get();
console.log(response);
}
run();
And here is the plete error:
(node:27226) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 0.0.0.0:443
at TCPConnectWrap.afterConnect [as onplete] (net.js:1144:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:27226) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27226) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Share
Improve this question
edited Sep 25, 2023 at 18:54
Brian Tompsett - 汤莱恩
5,89372 gold badges61 silver badges133 bronze badges
asked Sep 22, 2020 at 13:59
Samy RharadeSamy Rharade
1031 gold badge1 silver badge7 bronze badges
1 Answer
Reset to default 0ECONNREFUSED
means that your OS isn't able to setup a TCP connection. There's no service listening on 0.0.0.0:443
, which is your own puter. Are you sure that 0.0.0.0
is the host you need to connect to?
Either you need to start the required service on your puter or you need to use the correct IP address (whatever that may be).
本文标签: javascriptWhy this error come Error connect ECONNREFUSEDStack Overflow
版权声明:本文标题:javascript - Why this error come: Error: connect ECONNREFUSED? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745303917a2652535.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论