PipedreamHQ / PipedreamHQ/pipedream
[BUG] Microsoft Outlook Import Cannot find package '@pipedream/platform'
- Dominant language
- JavaScript
- Stars
- 11.7k
- Forks
- 5.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 102
Description
**Describe the bug**
I have a custom component which imports the microsoft outlook code to reuse the functions already built (it's only a slight tweak from a published component).
```js
import microsoftOutlook from "@pipedream/microsoft_outlook";
```
something in the new 1.0.0 release seems to have broken the component as it now returns an error
```js
Error: Cannot find package '@pipedream/platform' imported from /tmp/__pdg__/dist/code/03ea07e8fd32e081a9e57b4f20460e930ba0f3b48a6ed7ae1e3c7db9782594f1/node_modules/.pnpm/@pipedream+microsoft_outlook@1.0.1/node_modules/@pipedream/microsoft_outlook/microsoft_outlook.app.mjs
```
I was able to resolve this for now by changing the import to the previous version
```js
import microsoftOutlook from "@pipedream/microsoft_outlook@0.0.10";
```
**Additional context**
Custom Component Code
```js
import microsoftOutlook from "@pipedream/microsoft_outlook";
export default {
type: "action",
key: "zl-microsoft_outlook-send-many-emails",
version: "0.0.1",
name: "Send Many Emails",
description:
"Send many coppies of the same email from your Microsoft Outlook email account",
props: {
microsoftOutlook,
recipients: {
propDefinition: [microsoftOutlook, "recipients"],
description:
"Should be a multi-dimensional array. Will send a group email using each child array as the `to` field.",
},
subject: {
propDefinition: [microsoftOutlook, "subject"],
},
contentType: {
propDefinition: [microsoftOutlook, "contentType"],
},
content: {
propDefinition: [microsoftOutlook, "content"],
},
files: {
propDefinition: [microsoftOutlook, "files"],
},
expand: {
propDefinition: [microsoftOutlook, "expand"],
description:
"Additional email details, [See object definition](https://docs.microsoft.com/en-us/graph/api/resources/message)",
},
},
async run({ $ }) {
const recipientGroups = this.recipients;
const summaries = [];
for (const recipientGroup of recipientGroups) {
this.recipients = recipientGroup;
await this.microsoftOutlook.sendEmail({
$,
data: {
message: {
...this.microsoftOutlook.prepareMessageBody(this),
...this.expand,
},
},
});
summaries.push(`Successfully sent email to ${recipientGroup}`);
}
$.export("$summary", summaries.join("\n"));
return;
},
};
```
Contributor guide
Assessment
This issue has not been assessed yet.