PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.32k stars 5.27k forks source link

[BUG] Can not install @thirdweb-dev/contracts package on Pipedream Node.js code step #5775

Closed jackpmorgan closed 9 months ago

jackpmorgan commented 1 year ago

When I tried to install the package @thirdweb-dev/contracts, it failed with an error as below image

This package is a dependency for @thirdweb-dev/sdk package. So it prevents user from install this package also


Context

Hello,

For the past 6 months, I have been using the “@thirdweb-dev/sdk” package in my Pipedream workflows that use a step.

However, it has suddenly stopped working and now throws the error message “could not compute configurable props” whenever I try to run a node script using it.

The latest version of the package has not worked for some time but I have been able to run it using version 2.4.9 of “@thirdweb-dev/sdk” (@thirdweb-dev/sdk@2.4.9).

I am wondering what has changed within Pipedream that has caused this package to stop working given that it was supported at one point and how I can resolve this issue.

Also a weird side note, I have a paid workspace (@OME) that also uses the Thirdweb package in 15+ workflows (version 2.4.9) and they are working fine.

All the workflows mentioned are HTTPS -> Node.js -> HTTPS.

vunguyenhung commented 1 year ago

Hello @jackpmorgan, is it possible for you to share your Node.js code step? A screenshot would be a great help!

jackpmorgan commented 1 year ago

Hi!

Here is the code attached. Im simply just trying to initialize the SDK.

Would links to my other workspace that is still running this package successfully help?

Thank you for your help!

import { ThirdwebSDK } from "@thirdweb-dev/sdk@2.4.9";
import  ethers  from "ethers@5.7.2";

export default defineComponent({

  async run({ steps, $ }) {

  const sdk = new ThirdwebSDK("https://rpc.ankr.com/polygon");

  return sdk

  }
})

Screen Shot 2023-03-22 at 10 48 35 AM

jackpmorgan commented 1 year ago

@vunguyenhung Can you help me try to solve this bug for this package?

dylburger commented 1 year ago

Without more information, I'm going to close this issue. Feel free to reopen and add more details, if you'd like.

jackpmorgan commented 1 year ago

@dylburger hi, I have been waiting for a response from someone on the pipedream team to help me resolve the issue. I have provided everything that was asked. I still would love a some assistance with this issue!

dylburger commented 1 year ago

@jackpmorgan Apologies, a Pipedream workflow controls this logic and if we miss these comments, we'll incorrectly close the issue. I've re-opened and pinged @vunguyenhung to see if he can help triage. If there's a larger platform issue, I can help prioritize with the team.

vunguyenhung commented 1 year ago

Hello, I apologize for missing the message. I've checked an it seems like this is a problem on the package @thirdweb-dev/contracts-js and @thirdweb-dev/contracts installation step. Here's the error detail

image

I'll update the description and add this to Pipedream internal backlog

jackpmorgan commented 1 year ago

Hi @vunguyenhung & @dylburger,

Thank you so much for your help!

Just wanted to throw this out there as it may help on your end. I have another account that is currently using the 2.4.9 version of this SDK in production and it is working fine.

Here's one of the workflows in this account using the package: https://pipedream.com/@OME/send-token-p_brC8xDW/inspect. I am not game to edit these workflows anymore as it would break my app if they stopped working.

Not sure if this will help identify any changes to the node environments since these workflows were deployed.

Thanks again for your help and let me know if there is anything I can do to assist.

Jack

vunguyenhung commented 1 year ago

Thank you @jackpmorgan for the helpful information.

In your working workflow https://pipedream.com/@OME/send-token-p_brC8xDW/inspect, could you access your workflow settings and enable the option to allow Pipedream support to access it. That would be really helpful for @dylburger to check it.

Again, thank you for your information and sorry for the late response 🙏

jackpmorgan commented 1 year ago

@vunguyenhung No worries. I have just granted that access. Thanks again for your help!

dylburger commented 1 year ago

I've prioritized this with the team @jackpmorgan . We'll look into it as soon as we can, and post updates here.

brettbl commented 1 year ago

@dylburger I need help here as well

dylburger commented 1 year ago

Thanks for the note @brettbl . This is still on the team's backlog. We're about to release some major features (Git integration, folders, etc.) so we've had to focus on that. We'll let you know as soon as we have updates here.

dylburger commented 9 months ago

@jackpmorgan @brettbl it looks like this works in our Node.js v18 runtime now:

import ethers from "ethers";
import { ThirdwebSDK } from "@thirdweb-dev/sdk";

export default defineComponent({
  async run({ steps, $ }) {
    return
  }
})

Could you confirm if it works OK for you?

brettbl commented 9 months ago

@dylburger I received this error. It seems like Thirdweb needs ethers in order to work, I tried excluding it and got an error saying the library was missing.

image

dylburger commented 9 months ago

Unfortunately the authors of the @thirdweb-dev/sdk package put the ethers requirement in the devDependencies section of the package.json:

https://github.com/thirdweb-dev/js/blob/580e77b17088a439208bd1411c71e9fb0c2cbb79/packages/sdk/package.json#L136

We only install production dependencies, not devDependencies, which is standard. Could you either raise an issue with that team, or continue importing ethers above the thirdweb import?

jackpmorgan commented 9 months ago

@dylburger @brettbl

Hey! Yes since you guys updated to node 18 I can install and use Thirdweb perfectly.

Brett your issue is actually regarding Ethers.

Import ethers like this:

import { ethers } from "ethers@5";

For some reason the latest release of ethers is not usable.

Let me know how that goes!

dylburger commented 9 months ago

Awesome thanks for the assist @jackpmorgan , I'll close this since it looks like it's working.