问题描述
我正在尝试使用以下代码连接到API mailchimp:
const client = require('@mailchimp/mailchimp_marketing');
client.setConfig({
apiKey: "MY API KEY",server: "MY SERVER",});
async function run() {
const response = await client.ping.get();
console.log(response);
}
run();
在我的代码中,我拥有真正的API KEY和SERVER,但我在这里放了一个假的。
(node:28092) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: connect ECONNREFUSED 72.9.105.30:443
(node:28092) [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.
我已经通过使用以下命令安装mailchimp:
npm install mailchimp
但是错误仍然存在。