Skip to content

[Bug]: JavaScript Shopify Functions deployment fails with canonical_abi_realloc runtime version mismatch #6167

@Thevo

Description

@Thevo

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Function

Expected behavior

JavaScript Shopify Functions should deploy successfully to Shopify after building locally without errors. The deployment process should use compatible WASM runtime versions.

Actual behavior

Deployment fails with different canonical_abi_realloc import errors depending on @shopify/shopify_function version:

  • v2.0.0: "unknown import: javy_quickjs_provider_v3::canonical_abi_realloc has not been defined"
  • v1.0.6: "unknown import: shopify_functions_javy_v2::canonical_abi_realloc has not been defined"
  • Same build: "unknown import: shopify_functions_javy_v1::canonical_abi_realloc has not been defined"

Functions build successfully locally but fail during shopify app deploy.

Verbose output

Deployment Error Output

╭─ error ───────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Version couldn't be created. │
│ │
│ cart-checkout-validation │
│ │
│ Validation errors │
│ • unknown import: shopify_functions_javy_v1::canonical_abi_realloc has not been │
│ defined │
│ • Try the following actions: │
│ - Upgrade your Shopify CLI (see https://shopify.dev/docs/api/shopify-cli#upgrade) │
│ - Update your shopify_function dependency version │
│ - Rust (see https://shopify.dev/docs/apps/build/functions/programming-languages/r
│ ust-for-functions) │
│ - JavaScript (see https://shopify.dev/docs/apps/build/functions/programming-langu
│ ages/javascript-for-functions) │
│ - Look for help on the Shopify Functions community forum (see │
https://community.shopify.dev/c/shopify-functions) │
│ │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

Reproduction steps

  1. Create a JavaScript Shopify Function (purchase.validation.run or purchase.cart-transform.run)
  2. Configure with @shopify/shopify_function version 1.0.6 or 2.0.0
  3. Build function locally with npm run build (succeeds)
  4. Deploy with shopify app deploy
  5. Observe canonical_abi_realloc import error during deployment validation

Operating System

macOS Sequoia (darwin 24.5.0)

Shopify CLI version (shopify --version)

3.83.0

Shell

zsh

Node version (run node -v if you're not sure)

v24.0.0

What language and version are you using in your application?

JavaScript/TypeScript with @shopify/shopify_function 1.0.6-2.0.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions