Shopify App Extension Generate CLI Issue

image

When running the shopify app generate extension command in the CLI, I’m seeing this issue related to GraphQL codegen. I’ve tried various suggestions online and installing codegen to the project but no luck. I’m using the latest version of node, npm and the CLI but can’t get past this bit. I’m selecting Javascript when running through the prompts in the CLI and I then get this error.

From my testing this looks to be an issue with the CLI itself so I haven’t been able to fix myself.

shopify app generate extension --verbose
2025-09-19T14:30:48.229Z: Running command app generate extension
2025-09-19T14:30:48.233Z: Running system process in background:
  · Command: /usr/local/bin/node /usr/local/bin/shopify notifications list --ignore-errors
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2

2025-09-19T14:30:48.237Z: Notifications to show: 0
2025-09-19T14:30:48.254Z: Reading cached app information for directory /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2...
2025-09-19T14:30:48.254Z: Reading the content of file at shopify.app.toml...
2025-09-19T14:30:48.257Z: Reading the content of file at shopify.app.toml...
2025-09-19T14:30:48.258Z: Ensuring that the user is authenticated with the App Management API with the following scopes:
[]

2025-09-19T14:30:48.258Z: Getting session store...
2025-09-19T14:30:48.258Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly",
  "https://api.shopify.com/auth/organization.store-management",
  "https://api.shopify.com/auth/organization.on-demand-user-access",
  "https://api.shopify.com/auth/organization.apps.manage"
]
For applications:
{
  "appManagementApi": {
    "scopes": []
  },
  "businessPlatformApi": {
    "scopes": []
  }
}

2025-09-19T14:30:48.259Z: - Token validation -> It's expired: false
2025-09-19T14:30:48.260Z: Sending "BusinessPlatform" GraphQL request:
  query UserInfo {
  currentUserAccount {
    uuid
    email
    organizations(first: 2) {
      nodes {
        name
        __typename
      }
      __typename
    }
    __typename
  }
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://destinations.shopifysvc.com/destinations/api/2020-07/graphql
2025-09-19T14:30:48.268Z: Sending "App Management" GraphQL request:
  query ActiveAppReleaseFromApiKey($apiKey: String!) {
  app: appByKey(key: $apiKey) {
    ...AppVersionInfo
    __typename
  }
}

fragment ReleasedAppModule on AppModule {
  uuid
  userIdentifier
  handle
  config
  target
  specification {
    identifier
    externalIdentifier
    name
    managementExperience
  }
}

fragment AppVersionInfo on App {
  id
  key
  organizationId
  activeRoot {
    clientCredentials {
      secrets {
        key
      }
    }
  }
  activeRelease {
    id
    version {
      name
      appModules {
        ...ReleasedAppModule
      }
    }
  }
}

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://app.shopify.com/app_management/unstable/graphql.json
2025-09-19T14:30:48.997Z: Request to https://app.shopify.com/app_management/unstable/graphql.json completed in 729 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=92, verdict_flag_enabled;desc="count=1";dur=0.111, _y;desc="809a9648-f7fc-495e-8486-03c58d0b9ccd", _s;desc="3a32e909-d7cc-41be-bcd9-c1997b57f860", cfRequestDuration;dur=269.999981
 - x-request-id: 5c516491-6e4f-4fdc-926e-9fa7e22eed8e-1758292248
    
2025-09-19T14:30:49.009Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]

2025-09-19T14:30:49.009Z: Getting session store...
2025-09-19T14:30:49.010Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly",
  "https://api.shopify.com/auth/organization.store-management",
  "https://api.shopify.com/auth/organization.on-demand-user-access",
  "https://api.shopify.com/auth/organization.apps.manage"
]
For applications:
{
  "partnersApi": {
    "scopes": []
  }
}

2025-09-19T14:30:49.010Z: - Token validation -> It's expired: false
2025-09-19T14:30:49.010Z: Getting partner account info from cache
2025-09-19T14:30:49.015Z: Sending "Partners" GraphQL request:
  query FindApp($apiKey: String!) {
    app(apiKey: $apiKey) {
      id
      title
      apiKey
      organizationId
      apiSecretKeys {
        secret
      }
      appType
      grantedScopes
      applicationUrl
      redirectUrlWhitelist
      requestedAccessScopes
      webhookApiVersion
      embedded
      posEmbedded
      preferencesUrl
      gdprWebhooks {
        customerDeletionUrl
        customerDataRequestUrl
        shopDeletionUrl
      }
      appProxy {
        subPath
        subPathPrefix
        url
      }
      developmentStorePreviewEnabled
      disabledFlags
    }
  }

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-09-19T14:30:49.989Z: Request to https://partners.shopify.com/api/cli/graphql completed in 975 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"67a2769c0e265189a92e8240d2e75f74"
 - server-timing: processing;dur=677, socket_queue;dur=2.484, util;dur=0.3, cfRequestDuration;dur=802.999973
 - x-request-id: b97d68ab-a2e9-4b90-9cfa-f233d0c05cb0-1758292249
    
2025-09-19T14:30:49.996Z: Sending "Partners" GraphQL request:
  query FindOrganization($id: ID!) {
    organizations(id: $id, first: 1) {
      nodes {
        id
        businessName
      }
    }
  }

With variables:
{
  "id": "7432"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-09-19T14:30:50.146Z: Sending "Partners" GraphQL request:
  query fetchSpecifications($apiKey: String!) {
    extensionSpecifications(apiKey: $apiKey) {
      name
      externalName
      externalIdentifier
      identifier
      gated
      experience
      options {
        managementExperience
        registrationLimit
      }
      features {
        argo {
          surface
        }
      }
      validationSchema {
        jsonSchema
      }
    }
  }

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-09-19T14:30:50.514Z: Request to https://partners.shopify.com/api/cli/graphql completed in 367 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"40ad1eac72aaa8e8150599f63119322c"
 - server-timing: processing;dur=65, socket_queue;dur=1.909, util;dur=0.3, cfRequestDuration;dur=183.000088
 - x-request-id: 08ab6a7a-6fdb-4691-b9e0-123635218abe-1758292250
    
2025-09-19T14:30:50.525Z: The following extension specifications were defined locally but not found in the remote specifications: payments_extension, tax_calculation
2025-09-19T14:30:50.528Z: Reading the content of file at .gitignore...
2025-09-19T14:30:50.538Z: Reading the content of file at package.json...
2025-09-19T14:30:50.539Z: Reading the content of file at package.json...
2025-09-19T14:30:50.541Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2

2025-09-19T14:30:50.653Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2...
2025-09-19T14:30:50.654Z: Reading the content of file at package.json...
2025-09-19T14:30:50.654Z: Reading the content of file at .shopify/project.json...
2025-09-19T14:30:50.657Z: Notifications to show: 0
2025-09-19T14:30:50.657Z: Unable to decide project type as no web backend
2025-09-19T14:30:50.658Z: Reading cached app information for directory /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2...
2025-09-19T14:30:50.658Z: Storing app information for directory /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2:{
  "appId": "901c8c1b0dbd90e7a9a98de84d7b0290",
  "title": "gng-discount-function-2",
  "directory": "/Users/ashley.eastham/App:Functions Dev/gng-discount-function-2",
  "orgId": "7432"
}
2025-09-19T14:30:50.670Z: Sending "Partners" GraphQL request:
  query RemoteTemplateSpecifications($version: String, $apiKey: String) {
    templateSpecifications(version: $version, apiKey: $apiKey) {
      identifier
      name
      defaultName
      group
      sortPriority
      supportLinks
      types {
        url
        type
        extensionPoints
        supportedFlavors {
          name
          value
          path
        }
      }
    }
  }

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-09-19T14:30:51.039Z: Request to https://partners.shopify.com/api/cli/graphql completed in 369 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"1a825a588f85b1868b7e6975ccc55b72"
 - server-timing: processing;dur=62, socket_queue;dur=2.037, util;dur=0.3, cfRequestDuration;dur=180.999994
 - x-request-id: 1a9da78a-1ed2-4a25-bab4-190db2e7cf67-1758292250
    
?  Type of extension?
✔  Discount — Function

?  Name your extension:
✔  gng-discount-function-2

?  What would you like to work in?
✔  JavaScript

2025-09-19T14:31:02.596Z: Creating directory at extensions/gng-discount-function-2...
2025-09-19T14:31:02.596Z: Creating an empty file at extensions/gng-discount-function-2/.shopify.lock...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-19T14:31:02.610Z: Creating directory at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download...
2025-09-19T14:31:02.612Z: Git-cloning repository https://github.com/Shopify/extensions-templates into /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download...
2025-09-19T14:31:02.616Z: Running system process:
  · Command: git --version
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-19T14:31:03.625Z: Copying template from directory /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js to extensions/gng-discount-function-2
2025-09-19T14:31:03.629Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/index.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/locales/en.default.json.liquid is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/vite.config.js is a directory...
2025-09-19T14:31:03.630Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/shopify.extension.toml.liquid is a directory...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-19T14:31:03.631Z: Creating directory at extensions/gng-discount-function-2/src...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2/src...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2/src...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2/src...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2/src...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2/src...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2/src...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2/locales...
2025-09-19T14:31:03.632Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/vite.config.js to extensions/gng-discount-function-2/vite.config.js...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2...
2025-09-19T14:31:03.632Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/schema.graphql to extensions/gng-discount-function-2/schema.graphql...
2025-09-19T14:31:03.632Z: Creating directory at extensions/gng-discount-function-2...
2025-09-19T14:31:03.632Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid...
2025-09-19T14:31:03.632Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/locales/en.default.json.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/index.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/shopify.extension.toml.liquid...
2025-09-19T14:31:03.633Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/package.json.liquid...
2025-09-19T14:31:03.640Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/locales/en.default.json.liquid to extensions/gng-discount-function-2/locales/en.default.json...
2025-09-19T14:31:03.640Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid to extensions/gng-discount-function-2/src/cart_lines_disc
ounts_generate_run.test...                                                                                                                                                                                                                                                      2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/index.liquid to extensions/gng-discount-function-2/src/index...
2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid to extensions/gng-discount-function-2/src/cart_lines_d
iscounts_generate_run.graphql...                                                                                                                                                                                                                                                2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid to extensions/gng-discount-function-2/src/cart_deli
very_options_discounts_generate_run...                                                                                                                                                                                                                                          2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid to extensions/gng-discount-function-2/src/cart_lines_discounts
_generate_run...                                                                                                                                                                                                                                                                2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid to extensions/gng-discount-function-2/src/cart
_delivery_options_discounts_generate_run.test...                                                                                                                                                                                                                                2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/shopify.extension.toml.liquid to extensions/gng-discount-function-2/shopify.extension.toml...
2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid to extensions/gng-discount-function-2/src/c
art_delivery_options_discounts_generate_run.graphql...                                                                                                                                                                                                                          2025-09-19T14:31:03.641Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/aff7b2cb48639560bfa7b15c2d958e20/download/functions-discount-js/package.json.liquid to extensions/gng-discount-function-2/package.json...
2025-09-19T14:31:03.644Z: Writing some content to file at extensions/gng-discount-function-2/package.json...
2025-09-19T14:31:03.645Z: Writing some content to file at extensions/gng-discount-function-2/src/cart_lines_discounts_generate_run.test...
2025-09-19T14:31:03.645Z: Writing some content to file at extensions/gng-discount-function-2/shopify.extension.toml...
2025-09-19T14:31:03.645Z: Writing some content to file at extensions/gng-discount-function-2/src/index...
2025-09-19T14:31:03.645Z: Writing some content to file at extensions/gng-discount-function-2/src/cart_lines_discounts_generate_run...
2025-09-19T14:31:03.645Z: Writing some content to file at extensions/gng-discount-function-2/src/cart_delivery_options_discounts_generate_run...
2025-09-19T14:31:03.645Z: Writing some content to file at extensions/gng-discount-function-2/locales/en.default.json...
2025-09-19T14:31:03.645Z: Writing some content to file at extensions/gng-discount-function-2/src/cart_delivery_options_discounts_generate_run.test...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-19T14:31:03.738Z: Running system process:
  · Command: npm install
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Installing additional dependencies ...
2025-09-19T14:31:05.029Z: Adding the following dependencies if needed:
[
  {
    "name": "@shopify/shopify_function",
    "version": "~2.0.0"
  }
]
With options:
{
  "packageManager": "npm",
  "type": "prod",
  "directory": "/Users/ashley.eastham/App:Functions Dev/gng-discount-function-2/extensions/gng-discount-function-2"
}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Building GraphQL types ...
2025-09-19T14:31:05.031Z: Running system process:
  · Command: npm exec -- graphql-code-generator --config package.json
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

2025-09-19T14:31:05.277Z: Removing file at extensions/gng-discount-function-2...
── external error ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Error coming from `npm exec -- graphql-code-generator --config package.json`

Command failed with exit code 127: npm exec -- graphql-code-generator --config package.json
sh: graphql-code-generator: command not found

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

2025-09-19T14:31:05.285Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2

2025-09-19T14:31:05.388Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2...
2025-09-19T14:31:05.907Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 389 ms
With response headers:
 - x-request-id: 7c3e19a4-f921-493a-81bb-87c63a6698ed
    
2025-09-19T14:31:05.908Z: Analytics event sent: {
  "command": "app scaffold extension",
  "time_start": 1758292248231,
  "time_end": 1758292265282,
  "total_time": 17051,
  "success": false,
  "cli_version": "3.84.1",
  "ruby_version": "",
  "node_version": "22.19.0",
  "is_employee": false,
  "uname": "darwin arm64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\"]",
  "env_shell": "zsh",
  "env_device_id": "3a6b9877e5ec656abc55c888a80f10f27400b2c7",
  "env_cloud": "localhost",
  "env_package_manager": "npm",
  "env_is_global": true,
  "env_auth_method": "device_auth",
  "env_is_wsl": false,
  "env_build_repository": "Shopify/cli",
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_scaffold_required_auth": true,
  "cmd_scaffold_template_custom": false,
  "cmd_scaffold_type_owner": "@shopify/app",
  "cmd_app_all_configs_any": true,
  "cmd_app_all_configs_clients": "{\"shopify.app.toml\":\"901c8c1b0dbd90e7a9a98de84d7b0290\"}",
  "cmd_app_linked_config_used": true,
  "cmd_app_linked_config_name": "shopify.app.toml",
  "cmd_app_linked_config_git_tracked": true,
  "cmd_app_linked_config_source": "cached",
  "app_extensions_any": false,
  "app_extensions_breakdown": "{}",
  "app_extensions_count": 0,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": false,
  "app_extensions_function_count": 0,
  "app_extensions_theme_any": false,
  "app_extensions_theme_count": 0,
  "app_extensions_ui_any": false,
  "app_extensions_ui_count": 0,
  "app_name_hash": "5355358a3273a6eea7615064298a26d9df848f88",
  "app_path_hash": "ff5340476c9cbe69f26e047a9fcd8f99e9862344",
  "app_scopes": "[]",
  "app_web_backend_any": false,
  "app_web_backend_count": 0,
  "app_web_custom_layout": false,
  "app_web_frontend_any": false,
  "app_web_frontend_count": 0,
  "env_package_manager_workspaces": true,
  "partner_id": 7432,
  "api_key": "****",
  "cmd_app_reset_used": false,
  "cmd_scaffold_template_flavor": "vanilla-js",
  "cmd_scaffold_type": "discount",
  "cmd_scaffold_used_prompts_for_type": true,
  "cmd_all_timing_network_ms": 5003,
  "cmd_all_timing_prompts_ms": 11545,
  "cmd_all_launcher": "unknown",
  "cmd_all_topic": "app generate",
  "cmd_all_plugin": "@shopify/app",
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "ff5340476c9cbe69f26e047a9fcd8f99e9862344",
  "cmd_all_last_graphql_request_id": "1a9da78a-1ed2-4a25-bab4-190db2e7cf67-1758292250",
  "cmd_all_timing_active_ms": 501,
  "cmd_all_exit": "expected_error",
  "user_id": "8872bcc3-10a6-429c-b8bb-22c1dd3e7547",
  "request_ids": [
    "5c516491-6e4f-4fdc-926e-9fa7e22eed8e-1758292248",
    "b97d68ab-a2e9-4b90-9cfa-f233d0c05cb0-1758292249",
    "08ab6a7a-6fdb-4691-b9e0-123635218abe-1758292250",
    "1a9da78a-1ed2-4a25-bab4-190db2e7cf67-1758292250"
  ],
  "args": "--verbose",
  "error_message": "Command failed with exit code 127: npm exec -- graphql-code-generator --config package.json\nsh: graphql-code-generator: command not found",
  "app_name": "gng-discount-function-2",
  "env_plugin_installed_all": "[\"@shopify/cli\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2025-09-19T14:31:05.923Z: Reporting handled error to Bugsnag: Command failed with exit code 127: npm exec -- graphql-code-generator --config package.json
sh: graphql-code-generator: command not found
2025-09-19T14:31:06.043Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2

2025-09-19T14:31:06.140Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gng-discount-function-2...

Any help much appreciated.

Hi @Ash_Eastham

Thanks for sharing the whole stack trace, that’s nice.

Did you install the Shopify CLI via npm? And execute it with npm?

I know the documentation gives examples of using the CLI with yarn, npm, etc. But in reality I’ve found that really only pnpm works for me.

There’s special hooks in the CLI that react to the manager, but in my experience I had all kinds of issues using yarn v2 or npm before I switched to pnpm and just had a smooth experience overall.

npm uninstall -g @shopify/cli
pnpm install -g @shopify/cli

It seems like it’s become the unofficial recommended package manager in Shopify itself.

Thanks @Dylan,

I’ve tried again using pnpm but still running into the same issue:


> gng-disc-func-3@1.0.0 shopify /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3
> shopify app generate extension --verbose

2025-09-22T13:37:48.537Z: Running command app generate extension
2025-09-22T13:37:48.540Z: Running system process in background:
  · Command: /usr/local/bin/node /Users/ashley.eastham/Library/pnpm/global/5/.pnpm/@shopify+cli@3.84.2/node_modules/@shopify/cli/bin/run.js notifications list --ignore-errors
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3

2025-09-22T13:37:48.544Z: Notifications to show: 0
2025-09-22T13:37:48.563Z: Reading cached app information for directory /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3...
2025-09-22T13:37:48.563Z: Reading the content of file at shopify.app.toml...
2025-09-22T13:37:48.566Z: Reading the content of file at shopify.app.toml...
2025-09-22T13:37:48.567Z: Ensuring that the user is authenticated with the App Management API with the following scopes:
[]

2025-09-22T13:37:48.567Z: Getting session store...
2025-09-22T13:37:48.569Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly",
  "https://api.shopify.com/auth/organization.store-management",
  "https://api.shopify.com/auth/organization.on-demand-user-access",
  "https://api.shopify.com/auth/organization.apps.manage"
]
For applications:
{
  "appManagementApi": {
    "scopes": []
  },
  "businessPlatformApi": {
    "scopes": []
  }
}

2025-09-22T13:37:48.569Z: - Token validation -> It's expired: false
2025-09-22T13:37:48.570Z: Sending "BusinessPlatform" GraphQL request:
  query UserInfo {
  currentUserAccount {
    uuid
    email
    organizations(first: 2) {
      nodes {
        name
        __typename
      }
      __typename
    }
    __typename
  }
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://destinations.shopifysvc.com/destinations/api/2020-07/graphql
2025-09-22T13:37:48.576Z: Sending "App Management" GraphQL request:
  query ActiveAppReleaseFromApiKey($apiKey: String!) {
  app: appByKey(key: $apiKey) {
    ...AppVersionInfo
    __typename
  }
}

fragment ReleasedAppModule on AppModule {
  uuid
  userIdentifier
  handle
  config
  target
  specification {
    identifier
    externalIdentifier
    name
    managementExperience
  }
}

fragment AppVersionInfo on App {
  id
  key
  organizationId
  activeRoot {
    clientCredentials {
      secrets {
        key
      }
    }
    grantedShopifyApprovalScopes
  }
  activeRelease {
    id
    version {
      name
      appModules {
        ...ReleasedAppModule
      }
    }
  }
}

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://app.shopify.com/app_management/unstable/graphql.json
2025-09-22T13:37:49.127Z: Request to https://app.shopify.com/app_management/unstable/graphql.json completed in 550 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=178, verdict_flag_enabled;desc="count=3";dur=0.617, _y;desc="f1334995-adc0-4f9b-9a76-606f162175d9", _s;desc="03819fbf-0611-4744-b569-3b64c0c3a018", cfRequestDuration;dur=330.000162
 - x-request-id: 1d30f8b4-25c1-446f-a576-48452a0f3f2d-1758548268
    
2025-09-22T13:37:49.129Z: Sending "BusinessPlatform" GraphQL request:
  query FindOrganizations($organizationId: OrganizationID!) {
  currentUserAccount {
    organization(id: $organizationId) {
      id
      name
      __typename
    }
    __typename
  }
}

With variables:
{
  "organizationId": "Z2lkOi8vb3JnYW5pemF0aW9uL09yZ2FuaXphdGlvbi8xMjkzMjk4NTA="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://destinations.shopifysvc.com/destinations/api/2020-07/graphql
2025-09-22T13:37:49.135Z: Sending "App Management" GraphQL request:
  query fetchSpecifications($organizationId: ID!) {
  specifications(organizationId: $organizationId) {
    name
    identifier
    externalIdentifier
    features
    uidStrategy {
      appModuleLimit
      isClientProvided
      __typename
    }
    validationSchema {
      jsonSchema
      __typename
    }
    __typename
  }
}

With variables:
{
  "organizationId": "gid://shopify/Organization/129329850"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://app.shopify.com/app_management/unstable/graphql.json
2025-09-22T13:37:49.798Z: Request to https://app.shopify.com/app_management/unstable/graphql.json completed in 663 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=413, verdict_flag_enabled;desc="count=4";dur=0.474, _y;desc="6e8618e4-aa08-4f2e-bac9-9ff50261a938", _s;desc="668e740c-42dc-47a4-b310-1b3890b84b0b", cfRequestDuration;dur=575.999975
 - x-request-id: 6c88046e-7f68-4038-8569-5dfd4724cfc2-1758548269
    
2025-09-22T13:37:49.809Z: The following extension specifications were defined locally but not found in the remote specifications: product_subscription, tax_calculation
2025-09-22T13:37:49.810Z: The following extension specifications were found in the remote specifications but not defined locally: admin_app, app_link, app_nav_item, bulk_action, checkout_script_tag, flow_action_definition, flow_trigger_definition, flow_trigger_discovery_w
ebhook, manage_marketplaces, marketing_action, marketing_activity_extension, merchandising_create_publication, merchandising_fulfillment_variant_details, ping_message_callback, pos_link, product_configuration_link, resource_publication_settings, retail_cart_promotion, retail_product_recommendation, subscription_link                                                                                                                                                                                                                                   2025-09-22T13:37:49.812Z: Reading the content of file at .gitignore...
2025-09-22T13:37:49.983Z: Reading the content of file at package.json...
2025-09-22T13:37:49.984Z: Reading the content of file at package.json...
2025-09-22T13:37:49.985Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3

2025-09-22T13:37:50.084Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3...
2025-09-22T13:37:50.084Z: Reading the content of file at package.json...
2025-09-22T13:37:50.085Z: Reading the content of file at .shopify/project.json...
2025-09-22T13:37:50.088Z: Notifications to show: 0
2025-09-22T13:37:50.088Z: Unable to decide project type as no web backend
2025-09-22T13:37:50.088Z: Reading cached app information for directory /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3...
2025-09-22T13:37:50.088Z: Storing app information for directory /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3:{
  "appId": "2f6336ee0f36b7f8c5aa8c548bf93870",
  "title": "gng-disc-func-3",
  "directory": "/Users/ashley.eastham/App:Functions Dev/gng-disc-func-3",
  "orgId": "129329850"
}
2025-09-22T13:37:50.249Z: Request to https://cdn.shopify.com/static/cli/extensions/templates.json completed in 154 ms
With response headers:
 - cache-control: public, max-age=86400
 - content-type: application/json
 - server-timing: imagery;dur=66.066, imageryFetch;dur=61.138, cfRequestDuration;dur=15.999794
 - x-request-id: a9f738eb-04d2-41cb-ba51-ff62fe3caa46-1758400472
    
2025-09-22T13:37:50.253Z: Sending "BusinessPlatform" GraphQL request:
  query OrganizationBetaFlags($organizationId: OrganizationID!) {
      organization(organizationId: $organizationId) {
        id
        flag_enable_cli_customer_segment_template_extension: hasFeatureFlag(handle: "enable_cli_customer_segment_template_extension")
        flag_order_routing_extensibility_partner: hasFeatureFlag(handle: "order_routing_extensibility_partner")
        flag_payments_extensions_card_present: hasFeatureFlag(handle: "payments_extensions_card_present")
        flag_payments_extensions_credit_card: hasFeatureFlag(handle: "payments_extensions_credit_card")
        flag_payments_extensions_custom_credit_card: hasFeatureFlag(handle: "payments_extensions_custom_credit_card")
        flag_payments_extensions_custom_onsite: hasFeatureFlag(handle: "payments_extensions_custom_onsite")
        flag_payments_extensions_offsite: hasFeatureFlag(handle: "payments_extensions_offsite")
        flag_payments_extensions_redeemable: hasFeatureFlag(handle: "payments_extensions_redeemable")
      }
    }

With variables:
{
  "organizationId": "Z2lkOi8vb3JnYW5pemF0aW9uL09yZ2FuaXphdGlvbi8xMjkzMjk4NTA="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://destinations.shopifysvc.com/organizations/api/unstable/organization/129329850/graphql
2025-09-22T13:37:50.707Z: Request to https://destinations.shopifysvc.com/organizations/api/unstable/organization/129329850/graphql completed in 453 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"c801a9675d00690194e07bbadcd138ad"
 - server-timing: processing;dur=82, socket_queue;dur=1.629, util;dur=0.12, cfRequestDuration;dur=196.999788
 - x-request-id: 96ecfba7-02d6-49c6-b96e-549cad9dc512-1758548270
    
?  Type of extension?
✔  Discount

?  Name your extension:
✔  gandg-disc-func

?  What would you like to work in?
✔  JavaScript

2025-09-22T13:38:01.799Z: Creating directory at extensions/gandg-disc-func...
2025-09-22T13:38:01.800Z: Creating an empty file at extensions/gandg-disc-func/.shopify.lock...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T13:38:01.815Z: Creating directory at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download...
2025-09-22T13:38:01.816Z: Git-cloning repository https://github.com/Shopify/extensions-templates into /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download...
2025-09-22T13:38:01.820Z: Running system process:
  · Command: git --version
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T13:38:03.053Z: Copying template from directory /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js to extensions/gandg-disc-func
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/index.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/locales/en.default.json.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/vite.config.js is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/shopify.extension.toml.liquid is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/schema.graphql is a directory...
2025-09-22T13:38:03.058Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/package.json.liquid is a directory...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/src...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/src...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/src...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/src...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/src...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/src...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/src...
2025-09-22T13:38:03.058Z: Creating directory at extensions/gandg-disc-func/locales...
2025-09-22T13:38:03.059Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/vite.config.js to extensions/gandg-disc-func/vite.config.js...
2025-09-22T13:38:03.059Z: Creating directory at extensions/gandg-disc-func...
2025-09-22T13:38:03.059Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/schema.graphql to extensions/gandg-disc-func/schema.graphql...
2025-09-22T13:38:03.059Z: Creating directory at extensions/gandg-disc-func...
2025-09-22T13:38:03.059Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/index.liquid...
2025-09-22T13:38:03.059Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/locales/en.default.json.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/shopify.extension.toml.liquid...
2025-09-22T13:38:03.060Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/package.json.liquid...
2025-09-22T13:38:03.066Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/index.liquid to extensions/gandg-disc-func/src/index...
2025-09-22T13:38:03.066Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/locales/en.default.json.liquid to extensions/gandg-disc-func/locales/en.default.json...
2025-09-22T13:38:03.066Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid to extensions/gandg-disc-func/src/cart_lines_discounts_generat
e_run...                                                                                                                                                                                                                                                                        2025-09-22T13:38:03.067Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid to extensions/gandg-disc-func/src/cart_lines_discounts_ge
nerate_run.test...                                                                                                                                                                                                                                                              2025-09-22T13:38:03.067Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid to extensions/gandg-disc-func/src/cart_deliver
y_options_discounts_generate_run.test...                                                                                                                                                                                                                                        2025-09-22T13:38:03.067Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid to extensions/gandg-disc-func/src/cart_lines_discounts
_generate_run.graphql...                                                                                                                                                                                                                                                        2025-09-22T13:38:03.067Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid to extensions/gandg-disc-func/src/cart_delivery_opt
ions_discounts_generate_run...                                                                                                                                                                                                                                                  2025-09-22T13:38:03.067Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/36fbd3ca60792fcb4072fbc85c636110/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid to extensions/gandg-disc-func/src/cart_deli
very_options_discounts_generate_run.graphql...                                                                                                                                                                                                                                  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T13:38:03.072Z: Writing some content to file at extensions/gandg-disc-func/locales/en.default.json...
2025-09-22T13:38:03.072Z: Writing some content to file at extensions/gandg-disc-func/src/cart_lines_discounts_generate_run...
2025-09-22T13:38:03.072Z: Writing some content to file at extensions/gandg-disc-func/src/index...
2025-09-22T13:38:03.072Z: Writing some content to file at extensions/gandg-disc-func/shopify.extension.toml...
2025-09-22T13:38:03.072Z: Writing some content to file at extensions/gandg-disc-func/src/cart_delivery_options_discounts_generate_run...
2025-09-22T13:38:03.073Z: Writing some content to file at extensions/gandg-disc-func/src/cart_lines_discounts_generate_run.graphql...
2025-09-22T13:38:03.073Z: Writing some content to file at extensions/gandg-disc-func/src/cart_delivery_options_discounts_generate_run.graphql...
2025-09-22T13:38:03.073Z: Writing some content to file at extensions/gandg-disc-func/package.json...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T13:38:03.127Z: Adding the following dependencies if needed:
[
  {
    "name": "@shopify/shopify_function",
    "version": "~2.0.0"
  }
]
With options:
{
  "packageManager": "pnpm",
  "type": "prod",
  "directory": "/Users/ashley.eastham/App:Functions Dev/gng-disc-func-3/extensions/gandg-disc-func"
}
  
2025-09-22T13:38:03.127Z: Reading the content of file at extensions/gandg-disc-func/package.json...
2025-09-22T13:38:03.131Z: Running system process:
  · Command: npm exec -- graphql-code-generator --config package.json
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

2025-09-22T13:38:03.562Z: Removing file at extensions/gandg-disc-func...
── external error ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Error coming from `npm exec -- graphql-code-generator --config package.json`

Command failed with exit code 127: npm exec -- graphql-code-generator --config package.json
sh: graphql-code-generator: command not found

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

2025-09-22T13:38:03.570Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3

2025-09-22T13:38:03.670Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3...
2025-09-22T13:38:04.021Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 225 ms
With response headers:
 - x-request-id: d2e28587-6a06-4918-8526-8dffd37dddae
    
2025-09-22T13:38:04.021Z: Analytics event sent: {
  "command": "app scaffold extension",
  "time_start": 1758548268538,
  "time_end": 1758548283567,
  "total_time": 15029,
  "success": false,
  "cli_version": "3.84.2",
  "ruby_version": "",
  "node_version": "22.19.0",
  "is_employee": false,
  "uname": "darwin arm64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\"]",
  "env_shell": "zsh",
  "env_device_id": "3a6b9877e5ec656abc55c888a80f10f27400b2c7",
  "env_cloud": "localhost",
  "env_package_manager": "pnpm",
  "env_is_global": true,
  "env_auth_method": "device_auth",
  "env_is_wsl": false,
  "env_build_repository": "Shopify/cli",
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_scaffold_required_auth": true,
  "cmd_scaffold_template_custom": false,
  "cmd_scaffold_type_owner": "@shopify/app",
  "cmd_app_all_configs_any": true,
  "cmd_app_all_configs_clients": "{\"shopify.app.toml\":\"2f6336ee0f36b7f8c5aa8c548bf93870\"}",
  "cmd_app_linked_config_used": true,
  "cmd_app_linked_config_name": "shopify.app.toml",
  "cmd_app_linked_config_git_tracked": true,
  "cmd_app_linked_config_source": "cached",
  "app_extensions_any": false,
  "app_extensions_breakdown": "{}",
  "app_extensions_count": 0,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": false,
  "app_extensions_function_count": 0,
  "app_extensions_theme_any": false,
  "app_extensions_theme_count": 0,
  "app_extensions_ui_any": false,
  "app_extensions_ui_count": 0,
  "app_name_hash": "d6101498ea45fb2ea808a55e042fc651b8a920a5",
  "app_path_hash": "53edce616df4a97b50606d2b52171335b719934c",
  "app_scopes": "[]",
  "app_web_backend_any": false,
  "app_web_backend_count": 0,
  "app_web_custom_layout": false,
  "app_web_frontend_any": false,
  "app_web_frontend_count": 0,
  "env_package_manager_workspaces": true,
  "business_platform_id": 129329850,
  "api_key": "****",
  "cmd_app_reset_used": false,
  "cmd_scaffold_template_flavor": "vanilla-js",
  "cmd_scaffold_type": "discount",
  "cmd_scaffold_used_prompts_for_type": true,
  "cmd_all_timing_network_ms": 3491,
  "cmd_all_timing_prompts_ms": 11087,
  "cmd_all_launcher": "pnpm",
  "cmd_all_topic": "app generate",
  "cmd_all_plugin": "@shopify/app",
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "53edce616df4a97b50606d2b52171335b719934c",
  "cmd_all_last_graphql_request_id": "96ecfba7-02d6-49c6-b96e-549cad9dc512-1758548270",
  "cmd_all_timing_active_ms": 450,
  "cmd_all_exit": "expected_error",
  "user_id": "35149b04-9ed7-4f59-ade4-c4d31c53bb97",
  "request_ids": [
    "1d30f8b4-25c1-446f-a576-48452a0f3f2d-1758548268",
    "6c88046e-7f68-4038-8569-5dfd4724cfc2-1758548269",
    "96ecfba7-02d6-49c6-b96e-549cad9dc512-1758548270"
  ],
  "args": "--verbose",
  "error_message": "Command failed with exit code 127: npm exec -- graphql-code-generator --config package.json\nsh: graphql-code-generator: command not found",
  "app_name": "gng-disc-func-3",
  "env_plugin_installed_all": "[\"@shopify/cli\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2025-09-22T13:38:04.034Z: Reporting handled error to Bugsnag: Command failed with exit code 127: npm exec -- graphql-code-generator --config package.json
sh: graphql-code-generator: command not found
2025-09-22T13:38:04.169Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3

2025-09-22T13:38:04.260Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gng-disc-func-3...
 ELIFECYCLE  Command failed with exit code 1.

The stack trace shows the failing command is using the npm package manager.

Can you run this command to determine which package manager the shopify binary is installed under?

which shopify

Thanks for the quick reply @Dylan,


> gandg22-discount-function@1.0.0 shopify /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function
> shopify app generate extension --verbose

2025-09-22T14:09:56.860Z: Running command app generate extension
2025-09-22T14:09:56.862Z: Running system process in background:
  · Command: /usr/local/bin/node /Users/ashley.eastham/Library/pnpm/global/5/.pnpm/@shopify+cli@3.84.2/node_modules/@shopify/cli/bin/run.js notifications list --ignore-errors
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function

2025-09-22T14:09:56.867Z: Notifications to show: 0
2025-09-22T14:09:56.920Z: Reading cached app information for directory /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function...
2025-09-22T14:09:56.921Z: Reading the content of file at shopify.app.toml...
2025-09-22T14:09:56.923Z: Reading the content of file at shopify.app.toml...
2025-09-22T14:09:56.924Z: Ensuring that the user is authenticated with the App Management API with the following scopes:
[]

2025-09-22T14:09:56.924Z: Getting session store...
2025-09-22T14:09:56.925Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly",
  "https://api.shopify.com/auth/organization.store-management",
  "https://api.shopify.com/auth/organization.on-demand-user-access",
  "https://api.shopify.com/auth/organization.apps.manage"
]
For applications:
{
  "appManagementApi": {
    "scopes": []
  },
  "businessPlatformApi": {
    "scopes": []
  }
}

2025-09-22T14:09:56.925Z: - Token validation -> It's expired: false
2025-09-22T14:09:56.927Z: Sending "BusinessPlatform" GraphQL request:
  query UserInfo {
  currentUserAccount {
    uuid
    email
    organizations(first: 2) {
      nodes {
        name
        __typename
      }
      __typename
    }
    __typename
  }
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://destinations.shopifysvc.com/destinations/api/2020-07/graphql
2025-09-22T14:09:56.933Z: Sending "App Management" GraphQL request:
  query ActiveAppReleaseFromApiKey($apiKey: String!) {
  app: appByKey(key: $apiKey) {
    ...AppVersionInfo
    __typename
  }
}

fragment ReleasedAppModule on AppModule {
  uuid
  userIdentifier
  handle
  config
  target
  specification {
    identifier
    externalIdentifier
    name
    managementExperience
  }
}

fragment AppVersionInfo on App {
  id
  key
  organizationId
  activeRoot {
    clientCredentials {
      secrets {
        key
      }
    }
    grantedShopifyApprovalScopes
  }
  activeRelease {
    id
    version {
      name
      appModules {
        ...ReleasedAppModule
      }
    }
  }
}

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://app.shopify.com/app_management/unstable/graphql.json
2025-09-22T14:09:57.569Z: Request to https://app.shopify.com/app_management/unstable/graphql.json completed in 635 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=246, verdict_flag_enabled;desc="count=3";dur=0.282, _y;desc="58e9f981-ccda-4aef-be50-d113e0e58bed", _s;desc="8ed24b76-bcfa-4ef2-86e9-bd556af129f6", cfRequestDuration;dur=404.000044
 - x-request-id: fb0a6a22-63c5-4ed4-a9eb-e1e518e1bbb0-1758550197
    
2025-09-22T14:09:57.571Z: Sending "BusinessPlatform" GraphQL request:
  query FindOrganizations($organizationId: OrganizationID!) {
  currentUserAccount {
    organization(id: $organizationId) {
      id
      name
      __typename
    }
    __typename
  }
}

With variables:
{
  "organizationId": "Z2lkOi8vb3JnYW5pemF0aW9uL09yZ2FuaXphdGlvbi8xMjkzMjk4NTA="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://destinations.shopifysvc.com/destinations/api/2020-07/graphql
2025-09-22T14:09:57.576Z: Sending "App Management" GraphQL request:
  query fetchSpecifications($organizationId: ID!) {
  specifications(organizationId: $organizationId) {
    name
    identifier
    externalIdentifier
    features
    uidStrategy {
      appModuleLimit
      isClientProvided
      __typename
    }
    validationSchema {
      jsonSchema
      __typename
    }
    __typename
  }
}

With variables:
{
  "organizationId": "gid://shopify/Organization/129329850"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://app.shopify.com/app_management/unstable/graphql.json
2025-09-22T14:09:58.203Z: Request to https://app.shopify.com/app_management/unstable/graphql.json completed in 627 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=380, verdict_flag_enabled;desc="count=4";dur=0.8, _y;desc="07faf3fc-8e7c-4564-a50e-7eb9c216a780", _s;desc="f1be6405-d495-464c-82cb-1193ff5992d6", cfRequestDuration;dur=563.999891
 - x-request-id: 32f65f1b-c9a4-42cb-8e80-69fb146968dd-1758550197
    
2025-09-22T14:09:58.211Z: The following extension specifications were defined locally but not found in the remote specifications: product_subscription, tax_calculation
2025-09-22T14:09:58.211Z: The following extension specifications were found in the remote specifications but not defined locally: admin_app, app_link, app_nav_item, bulk_action, checkout_script_tag, flow_action_definition, flow_trigger_definition, flow_trigger_discovery_w
ebhook, manage_marketplaces, marketing_action, marketing_activity_extension, merchandising_create_publication, merchandising_fulfillment_variant_details, ping_message_callback, pos_link, product_configuration_link, resource_publication_settings, retail_cart_promotion, retail_product_recommendation, subscription_link                                                                                                                                                                                                                                   2025-09-22T14:09:58.212Z: Reading the content of file at .gitignore...
2025-09-22T14:09:58.379Z: Reading the content of file at package.json...
2025-09-22T14:09:58.379Z: Reading the content of file at package.json...
2025-09-22T14:09:58.381Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function

2025-09-22T14:09:58.482Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function...
2025-09-22T14:09:58.482Z: Reading the content of file at package.json...
2025-09-22T14:09:58.483Z: Reading the content of file at .shopify/project.json...
2025-09-22T14:09:58.488Z: Notifications to show: 0
2025-09-22T14:09:58.488Z: Unable to decide project type as no web backend
2025-09-22T14:09:58.489Z: Reading cached app information for directory /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function...
2025-09-22T14:09:58.489Z: Storing app information for directory /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function:{
  "appId": "4df103029ccf3ecd256a5b6e89d8e87b",
  "title": "gandg22-discount-function",
  "directory": "/Users/ashley.eastham/App:Functions Dev/gandg22-discount-function",
  "orgId": "129329850"
}
2025-09-22T14:09:58.682Z: Request to https://cdn.shopify.com/static/cli/extensions/templates.json completed in 186 ms
With response headers:
 - cache-control: public, max-age=86400
 - content-type: application/json
 - server-timing: imagery;dur=66.066, imageryFetch;dur=61.138, cfRequestDuration;dur=16.000032
 - x-request-id: a9f738eb-04d2-41cb-ba51-ff62fe3caa46-1758400472
    
2025-09-22T14:09:58.683Z: Sending "BusinessPlatform" GraphQL request:
  query OrganizationBetaFlags($organizationId: OrganizationID!) {
      organization(organizationId: $organizationId) {
        id
        flag_enable_cli_customer_segment_template_extension: hasFeatureFlag(handle: "enable_cli_customer_segment_template_extension")
        flag_order_routing_extensibility_partner: hasFeatureFlag(handle: "order_routing_extensibility_partner")
        flag_payments_extensions_card_present: hasFeatureFlag(handle: "payments_extensions_card_present")
        flag_payments_extensions_credit_card: hasFeatureFlag(handle: "payments_extensions_credit_card")
        flag_payments_extensions_custom_credit_card: hasFeatureFlag(handle: "payments_extensions_custom_credit_card")
        flag_payments_extensions_custom_onsite: hasFeatureFlag(handle: "payments_extensions_custom_onsite")
        flag_payments_extensions_offsite: hasFeatureFlag(handle: "payments_extensions_offsite")
        flag_payments_extensions_redeemable: hasFeatureFlag(handle: "payments_extensions_redeemable")
      }
    }

With variables:
{
  "organizationId": "Z2lkOi8vb3JnYW5pemF0aW9uL09yZ2FuaXphdGlvbi8xMjkzMjk4NTA="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.84.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://destinations.shopifysvc.com/organizations/api/unstable/organization/129329850/graphql
2025-09-22T14:09:58.925Z: Request to https://destinations.shopifysvc.com/organizations/api/unstable/organization/129329850/graphql completed in 242 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"c801a9675d00690194e07bbadcd138ad"
 - server-timing: processing;dur=53, socket_queue;dur=1.798, util;dur=0.04, cfRequestDuration;dur=180.999994
 - x-request-id: 88bcc618-e8fd-46c6-bbf3-d9d7f54b6005-1758550198
    
?  Type of extension?
✔  Discount

?  Name your extension:
✔  gandg25-disc-func

?  What would you like to work in?
✔  JavaScript

2025-09-22T14:10:07.745Z: Creating directory at extensions/gandg25-disc-func...
2025-09-22T14:10:07.746Z: Creating an empty file at extensions/gandg25-disc-func/.shopify.lock...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T14:10:07.761Z: Creating directory at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download...
2025-09-22T14:10:07.762Z: Git-cloning repository https://github.com/Shopify/extensions-templates into /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download...
2025-09-22T14:10:07.767Z: Running system process:
  · Command: git --version
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T14:10:10.022Z: Copying template from directory /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js to extensions/gandg25-disc-func
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/index.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/locales/en.default.json.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/vite.config.js is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/shopify.extension.toml.liquid is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/schema.graphql is a directory...
2025-09-22T14:10:10.027Z: Checking if /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/package.json.liquid is a directory...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/src...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/src...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/src...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/src...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/src...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/src...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/src...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func/locales...
2025-09-22T14:10:10.028Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/vite.config.js to extensions/gandg25-disc-func/vite.config.js...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func...
2025-09-22T14:10:10.028Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/schema.graphql to extensions/gandg25-disc-func/schema.graphql...
2025-09-22T14:10:10.028Z: Creating directory at extensions/gandg25-disc-func...
2025-09-22T14:10:10.028Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/index.liquid...
2025-09-22T14:10:10.028Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/locales/en.default.json.liquid...
2025-09-22T14:10:10.029Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid...
2025-09-22T14:10:10.029Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid...
2025-09-22T14:10:10.029Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid...
2025-09-22T14:10:10.029Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid...
2025-09-22T14:10:10.029Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid...
2025-09-22T14:10:10.029Z: Reading the content of file at /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T14:10:10.036Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/index.liquid to extensions/gandg25-disc-func/src/index...
2025-09-22T14:10:10.038Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/locales/en.default.json.liquid to extensions/gandg25-disc-func/locales/en.default.json...
2025-09-22T14:10:10.038Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.graphql.liquid to extensions/gandg25-disc-func/src/cart_lines_discoun
ts_generate_run.graphql...                                                                                                                                                                                                                                                      2025-09-22T14:10:10.038Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.test.liquid to extensions/gandg25-disc-func/src/cart_lines_discounts_
generate_run.test...                                                                                                                                                                                                                                                            2025-09-22T14:10:10.039Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.graphql.liquid to extensions/gandg25-disc-func/src/cart_de
livery_options_discounts_generate_run.graphql...                                                                                                                                                                                                                                2025-09-22T14:10:10.039Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.liquid to extensions/gandg25-disc-func/src/cart_delivery_o
ptions_discounts_generate_run...                                                                                                                                                                                                                                                2025-09-22T14:10:10.039Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_lines_discounts_generate_run.liquid to extensions/gandg25-disc-func/src/cart_lines_discounts_gener
ate_run...                                                                                                                                                                                                                                                                      2025-09-22T14:10:10.039Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/src/cart_delivery_options_discounts_generate_run.test.liquid to extensions/gandg25-disc-func/src/cart_deliv
ery_options_discounts_generate_run.test...                                                                                                                                                                                                                                      2025-09-22T14:10:10.039Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/shopify.extension.toml.liquid to extensions/gandg25-disc-func/shopify.extension.toml...
2025-09-22T14:10:10.039Z: Copying file from /private/var/folders/qq/lmyj7bsj545bf_llln74wy64yyflt4/T/cbe83734f9d659c22aa4c7e0e5ccfa9c/download/functions-discount-js/package.json.liquid to extensions/gandg25-disc-func/package.json...
2025-09-22T14:10:10.041Z: Writing some content to file at extensions/gandg25-disc-func/locales/en.default.json...
2025-09-22T14:10:10.042Z: Writing some content to file at extensions/gandg25-disc-func/src/index...
2025-09-22T14:10:10.042Z: Writing some content to file at extensions/gandg25-disc-func/src/cart_lines_discounts_generate_run.graphql...
2025-09-22T14:10:10.042Z: Writing some content to file at extensions/gandg25-disc-func/shopify.extension.toml...
2025-09-22T14:10:10.042Z: Writing some content to file at extensions/gandg25-disc-func/src/cart_delivery_options_discounts_generate_run...
2025-09-22T14:10:10.042Z: Writing some content to file at extensions/gandg25-disc-func/src/cart_delivery_options_discounts_generate_run.test...
2025-09-22T14:10:10.042Z: Writing some content to file at extensions/gandg25-disc-func/src/cart_lines_discounts_generate_run.test...
2025-09-22T14:10:10.042Z: Writing some content to file at extensions/gandg25-disc-func/src/cart_lines_discounts_generate_run...
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Generating function extension ...
2025-09-22T14:10:10.079Z: Adding the following dependencies if needed:
[
  {
    "name": "@shopify/shopify_function",
    "version": "~2.0.0"
  }
]
With options:
{
  "packageManager": "pnpm",
  "type": "prod",
  "directory": "/Users/ashley.eastham/App:Functions Dev/gandg22-discount-function/extensions/gandg25-disc-func"
}
  
2025-09-22T14:10:10.079Z: Reading the content of file at extensions/gandg25-disc-func/package.json...
2025-09-22T14:10:10.081Z: Running system process:
  · Command: npm exec -- graphql-code-generator --config package.json
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Building GraphQL types ...
npm warn Unknown env config "shamefully-hoist". This will stop working in the next major version of npm.
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

2025-09-22T14:10:11.571Z: Removing file at extensions/gandg25-disc-func...
── external error ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Error coming from `npm exec -- graphql-code-generator --config package.json`

Command failed with exit code 1: npm exec -- graphql-code-generator --config package.json
npm warn Unknown env config "shamefully-hoist". This will stop working in the next major version of npm.
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
npm warn Unknown env config "auto-install-peers". This will stop working in the next major version of npm.
npm warn Unknown env config "_jsr-registry". This will stop working in the next major version of npm.
Cannot convert undefined or null to object
[15:10:11] Parse configuration [started]
[15:10:11] Parse configuration [failed]
[15:10:11] → Cannot convert undefined or null to object

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

2025-09-22T14:10:11.580Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function

2025-09-22T14:10:11.701Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function...
2025-09-22T14:10:12.070Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 258 ms
With response headers:
 - x-request-id: 137d9de7-45a2-40e7-a33f-757bc5bc0444
    
2025-09-22T14:10:12.072Z: Analytics event sent: {
  "command": "app scaffold extension",
  "time_start": 1758550196860,
  "time_end": 1758550211577,
  "total_time": 14717,
  "success": false,
  "cli_version": "3.84.2",
  "ruby_version": "",
  "node_version": "22.19.0",
  "is_employee": false,
  "uname": "darwin arm64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\"]",
  "env_shell": "zsh",
  "env_device_id": "3a6b9877e5ec656abc55c888a80f10f27400b2c7",
  "env_cloud": "localhost",
  "env_package_manager": "pnpm",
  "env_is_global": true,
  "env_auth_method": "device_auth",
  "env_is_wsl": false,
  "env_build_repository": "Shopify/cli",
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_scaffold_required_auth": true,
  "cmd_scaffold_template_custom": false,
  "cmd_scaffold_type_owner": "@shopify/app",
  "cmd_app_all_configs_any": true,
  "cmd_app_all_configs_clients": "{\"shopify.app.toml\":\"4df103029ccf3ecd256a5b6e89d8e87b\"}",
  "cmd_app_linked_config_used": true,
  "cmd_app_linked_config_name": "shopify.app.toml",
  "cmd_app_linked_config_git_tracked": true,
  "cmd_app_linked_config_source": "cached",
  "cmd_app_linked_config_uses_cli_managed_urls": true,
  "app_extensions_any": false,
  "app_extensions_breakdown": "{}",
  "app_extensions_count": 0,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": false,
  "app_extensions_function_count": 0,
  "app_extensions_theme_any": false,
  "app_extensions_theme_count": 0,
  "app_extensions_ui_any": false,
  "app_extensions_ui_count": 0,
  "app_name_hash": "2f18000a6559af236ae437da87a037a86e8ed35d",
  "app_path_hash": "aba5547467acf24091df56941359e0f24bdb24dd",
  "app_scopes": "[]",
  "app_web_backend_any": false,
  "app_web_backend_count": 0,
  "app_web_custom_layout": false,
  "app_web_frontend_any": false,
  "app_web_frontend_count": 0,
  "env_package_manager_workspaces": true,
  "business_platform_id": 129329850,
  "api_key": "****",
  "cmd_app_reset_used": false,
  "cmd_scaffold_template_flavor": "vanilla-js",
  "cmd_scaffold_type": "discount",
  "cmd_scaffold_used_prompts_for_type": true,
  "cmd_all_timing_network_ms": 5442,
  "cmd_all_timing_prompts_ms": 8812,
  "cmd_all_launcher": "pnpm",
  "cmd_all_topic": "app generate",
  "cmd_all_plugin": "@shopify/app",
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "aba5547467acf24091df56941359e0f24bdb24dd",
  "cmd_all_last_graphql_request_id": "88bcc618-e8fd-46c6-bbf3-d9d7f54b6005-1758550198",
  "cmd_all_timing_active_ms": 462,
  "cmd_all_exit": "expected_error",
  "user_id": "35149b04-9ed7-4f59-ade4-c4d31c53bb97",
  "request_ids": [
    "fb0a6a22-63c5-4ed4-a9eb-e1e518e1bbb0-1758550197",
    "32f65f1b-c9a4-42cb-8e80-69fb146968dd-1758550197",
    "88bcc618-e8fd-46c6-bbf3-d9d7f54b6005-1758550198"
  ],
  "args": "--verbose",
  "error_message": "Command failed with exit code 1: npm exec -- graphql-code-generator --config package.json\nnpm warn Unknown env config \"shamefully-hoist\". This will stop working in the next major version of npm.\nnpm warn Unknown env config \"verify-deps-before-run\
". This will stop working in the next major version of npm.\nnpm warn Unknown env config \"auto-install-peers\". This will stop working in the next major version of npm.\nnpm warn Unknown env config \"_jsr-registry\". This will stop working in the next major version of npm.\nCannot convert undefined or null to object\n\u001b[2m[15:10:11]\u001b[22m Parse configuration [started]\n\u001b[2m[15:10:11]\u001b[22m Parse configuration [failed]\n\u001b[2m[15:10:11]\u001b[22m → Cannot convert undefined or null to object",                             "app_name": "gandg22-discount-function",
  "env_plugin_installed_all": "[\"@shopify/cli\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2025-09-22T14:10:12.089Z: Reporting handled error to Bugsnag: Command failed with exit code 1: npm exec -- graphql-code-generator --config package.json
npm warn Unknown env config "shamefully-hoist". This will stop working in the next major version of npm.
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
npm warn Unknown env config "auto-install-peers". This will stop working in the next major version of npm.
npm warn Unknown env config "_jsr-registry". This will stop working in the next major version of npm.
Cannot convert undefined or null to object
[15:10:11] Parse configuration [started]
[15:10:11] Parse configuration [failed]
[15:10:11] → Cannot convert undefined or null to object
2025-09-22T14:10:12.217Z: Running system process:
  · Command: npm prefix
  · Working directory: /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function

2025-09-22T14:10:12.320Z: Obtaining the dependency manager in directory /Users/ashley.eastham/App:Functions Dev/gandg22-discount-function...
 ELIFECYCLE  Command failed with exit code 1.

Should be installed correctly

Are you still seeing this issue @Ash_Eastham ?

I saw a similar error but executing the commands as su fixed them…

Actually figured it out last month - the folder the app was in had spaces or special characters which weren’t being parsed correctly by the CLI. Changed folder name to something like ‘app-functions-dev’ and the generate command now works for me