loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6418965539772108","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"DQoNCmNvbnN0IHNlbmRFbWFpbCA9ICh1c2VyRW1haWwpID0+IHsNCg0KICByZXR1cm4gbmV3IFByb21pc2UoYXN5bmMgKHJlc29sdmUscmVqZWN0KSA9PiB7DQoNCiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7DQogICAgICAgICAgICAvLyByZXR1cm4oYEVtYWlsIFNlbnQgdG8gJHt1c2VyRW1haWx9YCk7DQogICAgICAgICAgICByZXNvbHZlKGBFbWFpbCBTZW50IHRvICR7dXNlckVtYWlsfWApOw0KICAgICAgICB9LDMwMDApDQoNCiAgfSkNCn0NCg0KDQoNCmNvbnN0ICBzZW5kRW1haWxzID0gYXN5bmMgKCkgPT4gew0KDQogICAgY29uc3QgdXNlckVtYWlscyA9IFsnZ2FuZXNoQGdtYWlsLmNvbScsJ2pvaG5AZ21haWwuY29tJywnU2FtQGdtYWlsLmNvbSddOw0KDQogICAgY29uc3Qgc3RhdHVzID0gYXdhaXQgUHJvbWlzZS5hbGwodXNlckVtYWlscy5tYXAoYXN5bmMgZW1haWwgPT4gYXdhaXQgc2VuZEVtYWlsKGVtYWlsKSkpOw0KDQogICAgY29uc29sZS5sb2coIlN0YXR1cyA9PiIsc3RhdHVzKTsNCg0KfQ0KDQpzZW5kRW1haWxzKCk7"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const sendEmail = (userEmail) => {

  return new Promise(async (resolve,reject) => {

        setTimeout(() => {
            // return(`Email Sent to ${userEmail}`);
            resolve(`Email Sent to ${userEmail}`);
        },3000)

  })
}



const  sendEmails = async () => {

    const userEmails = ['[email protected]','[email protected]','[email protected]'];

    const status = await Promise.all(userEmails.map(async email => await sendEmail(email)));

    console.log("Status =>",status);

}

sendEmails();
node v10.16.0