Why am I getting a "*TypeError* Webflow is not a constructor" error in an out-of-the-box step despite resetting all config variables?

This topic was automatically generated from Slack. You can find the original thread here.

Hey team - heads up getting the error “TypeError Webflow is not a constructor” on an out-of-the-box step. Checked and hard reset all the config variables and no dice.

Works with custom code so seems like something might be up with the Action

Thanks for raising this issue! I can reproduce it and has created a ticket for Pipedream Component dev team to check: [BUG] Webflow actions and sources are unusable · Issue #10595 · PipedreamHQ/pipedream · GitHub

Please subscribe to the ticket to be noticed when it is fixed

Thanks Leo! I bet it’s due to their API update - hopefully a quick and easy fix :pray:

It looks like Webflow’s js sdk had a major version change 4 days ago - I’ve pinned the prior version 1.3.1 and shipped the fix. Can you please try updating the action and let me know if this is now working for you?

I swapped out the Action for a custom code one but will try to use it again in the future and post here if there are any issues. Thank you!

Thanks for flagging!

Now I see this error. It’s from ‘webflow-list-collection-items’

I’ve used this code in one of my steps:

import webflow from "@pipedream/webflow";

export default {
  key: "webflow-list-collection-items",
  name: "List Collection Items",
  description: "List Items of a collection. [See the docs here](https://developers.webflow.com/#get-all-items-for-a-collection)",
  version: "0.0.5",
  type: "action",
  props: {
	webflow,
	siteId: {
	  propDefinition: [
		webflow,
		"sites",
	  ],
	},
	collectionId: {
	  propDefinition: [
		webflow,
		"collections",
		(c) => ({
		  siteId: c.siteId,
		}),
	  ],
	},
  },
  async run({ $ }) {
	const response = await this.webflow.getItems(0, this.collectionId);
	$.export("$summary", "Successfully retrieved collections items");
	return {
	  collectionId: this.collectionId,
	  siteId: this.siteId,
	  response
	}
  },
};

Hi Stepan, can you clarify what you are trying to do here? Are you trying to run this in a code step, or are you modifying a registry component locally, and pd publish to publish your version of the action privately?

In addition, if there’s something that isn’t working exactly how you’d like with the registry version of List Collection Items , please let us know and we’d be happy to improve the usability of it!

Hello, . I try to run this in code step and yes I’ve modified it (I’ve added two lines collectionId: this.collectionId and siteId: this.siteId because I want to use collectionId and SiteId on the other steps (like step.$return_value.collectionId) where I have custom code.

Hi Stepan, can you try modifying the registry code locally, and then using pd publish to publish your update to My Actions? The import syntax would be different in a code step, versus modifying the registry code and publishing it as an action.

Thank you . Do you mean this part (import webflow from “@pipedream/webflow”:wink: ? How it have to look like. at the moment I can’t publish because of error 500.

I don’t mean that part, I meant that you can modify the registry component code locally ( do not change the imports), and then pd publish and that should work!