Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: t.split is not a function #1904

Open
jackmacaa opened this issue Mar 31, 2025 · 1 comment
Open

[Bug]: t.split is not a function #1904

jackmacaa opened this issue Mar 31, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@jackmacaa
Copy link

Error ID

c15196ef-a6de-427e-97e6-cbcedbe2ca3f

What happened?

Running an action triggered by a webhook. GGT in cli just crashes. Have done a search for "t.split" in repo and nothing appears.

Error:
An error occurred while communicating with Gadget
t.split is not a function

What did you expect to happen?

No response

Steps to reproduce

Update a product in shopify,
webhook triggers action to update products data from external API.
CLI in VScode crashes, no similar error in logs in web IDE.

Anything else?

Sorry wish i could be more helpful, the cli just crashes sometimes now. It only just started to happen, its likly to do with some code i just added.

I needed to add a polling check to shopify for the product media being finished processing before i could add the media ID to the product variant, perhaps my approach is causing the bug,

` let media = await getMediaById(shopifyClient, mediaId);

  let count = 0;
  while (media.node.fileStatus !== "READY" || count > 20) {
    await delay(500);
    media = await getMediaById(shopifyClient, mediaId);
    count++;
    logger.info(media, `MEDIA STATUS, amount of polls ${count}`);
  }

`

@jackmacaa jackmacaa added the bug Something isn't working label Mar 31, 2025
@scott-rc
Copy link
Collaborator

Sorry about this @jackmacaa -- we minify ggt's code when we publish it to npm, so t.split is likely very different in the repo.

Do you mind re-running ggt with NODE_OPTIONS='--enable-source-maps'? That should make ggt print better stack traces. e.g.

NODE_OPTIONS='--enable-source-maps' ggt dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants