Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug]: ERROR: Could not resolve "@shopify/shopify_function/run" #3982

Open
2 tasks done
jordanaf808 opened this issue Jun 5, 2024 · 9 comments
Open
2 tasks done

[Bug]: ERROR: Could not resolve "@shopify/shopify_function/run" #3982

jordanaf808 opened this issue Jun 5, 2024 · 9 comments
Labels
Area: Functions issues with functions Type: Bug Something isn't working

Comments

@jordanaf808
Copy link

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?

Extension, Function

Expected behavior

On shopify app dev open my development store to install the app extension, so I can continue with the discount function tutorial

Actual behavior

On shopify app dev I can successfully log in to my partners account, connect a store, and a preview link is generated, but then an error pops up saying:

17:12:53graphiqlGraphiQL server started on port 3457
17:12:54product-discountBuilding function product-discount...
17:12:54product-discountBuilding GraphQL types...
17:12:55 product-disco │ (node:290) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
         nt           Please use a userland alternative instead.
17:12:55product-discount │ (Use `node --trace-deprecation ...` to show where the warning was created)
17:12:55product-discountBundling JS function...

╭─ error ───────────────────────────────────────────────────╮
│                                                                              │
│  Build failed with 1 error:                                                  │
│  <stdin>:2:26: ERROR: Could not resolve "@shopify/shopify_function/run"      │
│                                                                              │
│  To investigate the issue, examine this stack trace:                         │
│    at <stdin>:2:26: ERROR: Could not resolve "                               │
│    at failureErrorWithLog (../../../.nvm/versions/node/v21.7.3/lib/node_mod  │
│    ules/@shopify/cli/node_modules/esbuild/lib/main.js:1650)                  │
│    at (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@shopify/cli/no  │
│    de_modules/esbuild/lib/main.js:1058)                                      │
│    at (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@shopify/cli/no  │
│    de_modules/esbuild/lib/main.js:1003)                                      │
│    at buildResponseToResult (../../../.nvm/versions/node/v21.7.3/lib/node_m  │
│    odules/@shopify/cli/node_modules/esbuild/lib/main.js:1056)                │
│    at (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@shopify/cli/no  │
│    de_modules/esbuild/lib/main.js:1085)                                      │
│    at <computed> (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@sho  │
│    pify/cli/node_modules/esbuild/lib/main.js:703)                            │
│    at handleIncomingPacket (../../../.nvm/versions/node/v21.7.3/lib/node_mo  │
│    dules/@shopify/cli/node_modules/esbuild/lib/main.js:763)                  │
│    at readFromStdout (../../../.nvm/versions/node/v21.7.3/lib/node_modules/  │
│    @shopify/cli/node_modules/esbuild/lib/main.js:679)                        │
│    at emit (node:events:519)                                                 │
│    at emit (node:domain:488)                

Before, I had Shopify-CLI and Node installed with Intel architecture active, same error. I then removed Shopify-CLI and Node 21, updated homebrew, made sure it was configured properly, installed the latest Ruby 3.3.2, made sure i was on Arm64, then installed node 21 and Shopify-CLI. Same error.

I tried searching the web for anything related to this shopify_function error, but couldn't find anything related. Most issues recommend uninstalling and reinstalling homebrew, shopify-cli, etc, but that didn't work. I tried with yarn and npm. I tried running under Rosetta 2, installing Node and Shopify-CLI while under Intel architecture, no luck.

Any assistance would be greatly appreciated

Verbose output

% npm run dev --verbose
npm verbose cli /Users/***/.nvm/versions/node/v20.14.0/bin/node /Users/***/.nvm/versions/node/v20.14.0/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verbose title npm run dev
npm verbose argv "run" "dev" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:/Users/***/.npm/_logs/2024-06-05T05_26_32_780Z-
npm verbose logfile /Users/***/.npm/_logs/2024-06-05T05_26_32_780Z-debug-0.log

> [email protected] dev
> shopify app dev

╭─ info ───────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Using shopify.app.extension-only-app.toml:                                  │
│                                                                              │
│    • Org:             ***                                                    │
│    • App:             extension-only-app                                     │
│    • Dev store:       extension-only-apps.myshopify.com                      │
│    • Update URLs:     Not yet configured                                     │
│                                                                              │
│   You can pass `--reset` to your command to reset your app configuration.    │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

22:26:39 │ graphiql         │ GraphiQL server started on port 3457
22:26:40 │ product-discount │ Building function product-discount...
22:26:40 │ product-discount │ Building GraphQL types...
22:26:40 │ product-discount │ npm
22:26:40 │ product-discount │  verb cli /Users/***/.nvm/versions/node/v20.14.0/bin/node /Users/***/Dev/node_modules/.bin/npm
22:26:40 │ product-discount │ npm info using [email protected]
22:26:40 │ product-discount │ npm info using [email protected]
22:26:40 │ product-discount │ npm info found workspace root at /Users/***/Dev/Shopify/extension-only-app
22:26:40 │ product-discount │ npm verb title npm exec graphql-code-generator --config package.json
22:26:40 │ product-discount │ npm verb argv "exec" "--" "graphql-code-generator" "--config" "package.json"
22:26:40 │ product-discount │ npm verb logfile logs-max:10 dir:/Users/***/.npm/_logs/2024-06-05T05_26_40_963Z-
22:26:40 │ product-discount │ npm verb logfile /Users/***/.npm/_logs/2024-06-05T05_26_40_963Z-debug-0.log
22:26:41 │ product-discount │ npm verb
22:26:41 │ product-discount │ exit 0
22:26:41 │ product-discount │ npm info ok
22:26:41 │ product-discount │ Bundling JS function...

╭─ error ────────────────────────────────────────────────────────────────────────────╮
│                                                                                    │
│  Build failed with 1 error:                                                        │
│  <stdin>:2:26: ERROR: Could not resolve "@shopify/shopify_function/run"            │
│                                                                                    │
│  To investigate the issue, examine this stack trace:                               │
│    at <stdin>:2:26: ERROR: Could not resolve "
│    at failureErrorWithLog (../../../.nvm/versions/node/v20.14.0/lib/node_modules/  │
│    @shopify/cli/node_modules/esbuild/lib/main.js:1650)                             │
│    at (../../../.nvm/versions/node/v20.14.0/lib/node_modules/@shopify/cli/node_mo  │
│    dules/esbuild/lib/main.js:1058)                                                 │
│    at (../../../.nvm/versions/node/v20.14.0/lib/node_modules/@shopify/cli/node_mo  │
│    dules/esbuild/lib/main.js:1003)                                                 │
│    at buildResponseToResult (../../../.nvm/versions/node/v20.14.0/lib/node_module  │
│    s/@shopify/cli/node_modules/esbuild/lib/main.js:1056)                           │
│    at (../../../.nvm/versions/node/v20.14.0/lib/node_modules/@shopify/cli/node_mo  │
│    dules/esbuild/lib/main.js:1085)                                                 │
│    at <computed> (../../../.nvm/versions/node/v20.14.0/lib/node_modules/@shopify/  │
│    cli/node_modules/esbuild/lib/main.js:703)                                       │
│    at handleIncomingPacket (../../../.nvm/versions/node/v20.14.0/lib/node_modules  │
│    /@shopify/cli/node_modules/esbuild/lib/main.js:763)                             │
│    at readFromStdout (../../../.nvm/versions/node/v20.14.0/lib/node_modules/@shop  │
│    ify/cli/node_modules/esbuild/lib/main.js:679)                                   │
│    at emit (node:events:519)                                                       │
│    at emit (node:domain:488)                                                       │
│                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────╯

    Error: Build failed with 1 error:
    <stdin>:2:26: ERROR: Could not resolve "@shopify/shopify_function/run"
npm verbose exit 1
npm verbose code 1

Reproduction steps

  1. shopify app init
  2. select 'start by adding your first extension'
  3. shopify app generate extension
  4. cd into new directory and shopify app dev
  5. sign-in and connect store

Operating System

2023 M2 MacOS Sonoma 14.5

Shopify CLI version (check your project's package.json if you're not sure)

3.61.0

Shell

zsh

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

v20.14.0 and v21.7.3

What language and version are you using in your application?

Ruby 3.3.2

@jordanaf808 jordanaf808 added the Type: Bug Something isn't working label Jun 5, 2024
@jordanaf808 jordanaf808 changed the title [Bug]: <YOUR ISSUE TITLE> [Bug]: ERROR: Could not resolve "@shopify/shopify_function/run" Jun 5, 2024
@gonzaloriestra
Copy link
Contributor

Hi! Thanks for creating the issue. But I'm not able to reproduce it, even with a very similar environment:

  • In step 3, you are choosing a Discount products function and Javascript, right?
  • Can you share the output of npm run dev -- --verbose? Without the extra separator (--) the verbose option is read by NPM

@jordanaf808
Copy link
Author

jordanaf808 commented Jun 5, 2024

  • In step 3, you are choosing a Discount products function and Javascript, right?

Yes, and I tried with Typescript as well.

  • Can you share the output of npm run dev -- --verbose? Without the extra separator (--) the verbose option is read by NPM

the last time i used the npm run dev --verbose command, so I'll try npm run dev -- --verbose this time. I think that's what you mean...

% npm run dev -- --verbose 

> [email protected] dev
> shopify app dev --verbose

(node:13199) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
2024-06-05T15:12:07.029Z: Running command app dev
2024-06-05T15:12:07.037Z: Getting a random port...
2024-06-05T15:12:07.042Z: Random port obtained: 55528
2024-06-05T15:12:07.813Z: cloudflared already installed, skipping
2024-06-05T15:12:07.816Z: 
Running system process:
  · Command: /Users/***/.nvm/versions/node/v21.7.3/lib/node_modules/@shopify/cli/bin/cloudflared tunnel --url http://localhost:55528 --no-autoupdate
  · Working directory: /Users/***/Dev/Shopify/extension-only-app

2024-06-05T15:12:07.820Z: Reading cached app information for directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:07.820Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:07.823Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:07.825Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:07.825Z: Reading the content of file at shopify.app.toml...
2024-06-05T15:12:07.848Z: 2024-06-05T15:12:07Z INF Thank you for trying Cloudflare Tunnel. Doing so, without a Cloudflare account, is a quick way to experiment and try it out. However, be aware that these account-less Tunnels have no uptime guarantee. If you intend to use Tunnels in production you should use a pre-created named tunnel by following: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps

2024-06-05T15:12:07.849Z: 2024-06-05T15:12:07Z INF Requesting new quick Tunnel on trycloudflare.com...

2024-06-05T15:12:07.911Z: Reading cached app information for directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:07.912Z: Reading cached app information for directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:07.912Z: Reading cached app information for directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:07.913Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:07.913Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:07.915Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:07.915Z: Reading the content of file at shopify.app.toml...
2024-06-05T15:12:07.985Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]

2024-06-05T15:12:07.985Z: Getting session store...
2024-06-05T15:12:07.986Z: 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.apps.manage"
]
For applications:
{
  "partnersApi": {
    "scopes": []
  }
}

2024-06-05T15:12:07.987Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-06-05T15:12:07.987Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.61.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-06-05T15:12:08.197Z: Request to https://accounts.shopify.com/oauth/introspection completed in 206 ms
With response headers:
 - cache-control: no-cache
 - content-type: text/html
 - x-request-id: 619be609-****-****-****-ffe668b92a46-1717600328
    
2024-06-05T15:12:08.198Z: The Introspection request failed with:
 - status: 401
 - www-authenticate header: "error=\"invalid_token\",error_description=\"The access token provided is expired, revoked, malformed or invalid for other reasons.\""
 - body: ""
2024-06-05T15:12:08.198Z: 
The validation of the token for application/identity completed with the following results:
- It's expired: true
- It's invalid in identity: true
  
2024-06-05T15:12:08.198Z: The current session is valid but needs refresh. Refreshing...
2024-06-05T15:12:08.200Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQI8uL_sgYQkpuAswZSJggBEhBVnVSxXzxG17b-IwkDZgPNGhCI-su9fTBFwJc5knADDn5qEkDR12TBEQvooQb3-dYBxl8Y9Eimls8buXkMOODUXvBfqiUtP2p03eCKlgnw0LLiBvRT-hWMXuH30ENEKdxVn6UB&refresh_token=atkn_CiEI8uL_sgYQ8vydtAaiARIKEIj6y719MEXAlzmScAMOfmoSQKgKsNw62teRbFqiyNpSCCSCIiHmzqBG6r7WsmIQTttuu_6F0Z3aOgVOlOi1nWRJJX5Xcxr0xeJZyFs15tZWxQs&client_id=fbdb2649-****-****-****-908d24cfd7e3
With request headers:
 - User-Agent: Shopify CLI; v=3.61.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-06-05T15:12:08.444Z: Request to https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQI8uL_sgYQkpuAswZSJggBEhBVnVSxXzxG17b-IwkDZgPNGhCI-su9fTBFwJc5knADDn5qEkDR12TBEQvooQb3-dYBxl8Y9Eimls8buXkMOODUXvBfqiUtP2p03eCKlgnw0LLiBvRT-hWMXuH30ENEKdxVn6UB&refresh_token=atkn_CiEI8uL_sgYQ8vydtAaiARIKEIj6y719MEXAlzmScAMOfmoSQKgKsNw62teRbFqiyNpSCCSCIiHmzqBG6r7WsmIQTttuu_6F0Z3aOgVOlOi1nWRJJX5Xcxr0xeJZyFs15tZWxQs&client_id=fbdb2649-****-****-****-908d24cfd7e3 completed in 242 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"99a249663a956a75d1057bd5a66d****"
 - x-request-id: 9d59b164-****-****-****-34637125f419-1717600328
    
2024-06-05T15:12:08.447Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-****-****-****-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.61.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-06-05T15:12:08.447Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-****-****-****-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.61.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-06-05T15:12:08.447Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-****-****-****-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.61.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-06-05T15:12:08.694Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-****-****-****-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=**** completed in 244 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"6438b9c3b399ed8858aece4e26d2e0c4"
 - x-request-id: ecff1390-2837-4173-aa1e-c20617532331-1717600328
    
2024-06-05T15:12:08.697Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-****-****-****-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=**** completed in 248 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"d00df7c4fe3390da7822b0e1b2301305"
 - x-request-id: d6d3d872-b126-484e-8680-87922f6dc0f7-1717600328
    
2024-06-05T15:12:08.721Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-****-****-****-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=**** completed in 270 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"f5812440bb068701414a1c80e9814da1"
 - x-request-id: 6d341ae6-2e60-45ff-85d1-9cd731fa2602-1717600328
    
2024-06-05T15:12:08.724Z: Setting session store...
2024-06-05T15:12:08.731Z: Verifying that the user has a Partner organization
2024-06-05T15:12:08.739Z: Sending "Partners" GraphQL request:
  {
    organizations(first: 1) {
      nodes {
        id
      }
    }
  }

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

2024-06-05T15:12:09.044Z: Request to https://partners.shopify.com/api/cli/graphql completed in 282 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"2ecb0c517c944593ed160f3da6cfda88"
 - x-request-id: 43e98c6d-3c99-4ede-97ae-9ae8ae5dd827-1717600328
    
2024-06-05T15:12:09.050Z: Sending "Partners" GraphQL request:
  query currentAccountInfo {
    currentAccountInfo {
      __typename
      ... on ServiceAccount {
        orgName
      }
      ... on UserAccount {
        email
      }
    }
  }

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

2024-06-05T15:12:09.229Z: 2024-06-05T15:12:09Z INF +--------------------------------------------------------------------------------------------+

2024-06-05T15:12:09.230Z: 2024-06-05T15:12:09Z INF |  Your quick Tunnel has been created! Visit it at (it may take some time to be reachable):  |
2024-06-05T15:12:09Z INF |  https://trail-rebound-limitations-teen.trycloudflare.com                                  |
2024-06-05T15:12:09Z INF +--------------------------------------------------------------------------------------------+

2024-06-05T15:12:09.231Z: 2024-06-05T15:12:09Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]

2024-06-05T15:12:09.232Z: 2024-06-05T15:12:09Z INF Version 2024.2.1
2024-06-05T15:12:09Z INF GOOS: darwin, GOVersion: go1.21.5-devel-cf, GoArch: amd64

2024-06-05T15:12:09.232Z: 2024-06-05T15:12:09Z INF Settings: map[ha-connections:1 no-autoupdate:true protocol:quic url:http://localhost:55528]

2024-06-05T15:12:09.236Z: 2024-06-05T15:12:09Z INF Generated Connector ID: a8fa8bb2-76a6-45b5-9b81-b9eff233153c

2024-06-05T15:12:09.306Z: Request to https://partners.shopify.com/api/cli/graphql completed in 253 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"041f002e00ecc4928afad75764d09baa"
 - x-request-id: 1c48b906-46f4-4dcd-83db-2ee46768e3cc-1717600329
    
2024-06-05T15:12:09.311Z: 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.61.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-06-05T15:12:09.315Z: 2024-06-05T15:12:09Z INF Initial protocol quic

2024-06-05T15:12:09.317Z: 2024-06-05T15:12:09Z INF ICMP proxy will use 192.168.1.4 as source for IPv4

2024-06-05T15:12:09.317Z: 2024-06-05T15:12:09Z INF ICMP proxy will use fe80::453:5d1d:2d7b:5daa in zone en0 as source for IPv6

2024-06-05T15:12:09.318Z: 2024-06-05T15:12:09Z INF Created ICMP proxy listening on 192.168.1.4:0

2024-06-05T15:12:09.319Z: 2024-06-05T15:12:09Z INF Created ICMP proxy listening on [fe80::453:5d1d:2d7b:5daa%en0]:0

2024-06-05T15:12:09.426Z: 2024-06-05T15:12:09Z INF Starting metrics server on 127.0.0.1:55539/metrics

2024-06-05T15:12:09.517Z: 2024-06-05T15:12:09Z WRN Your version 2024.2.1 is outdated. We recommend upgrading it to 2024.6.0

2024-06-05T15:12:09.661Z: 2024-06-05T15:12:09Z INF Registered tunnel connection connIndex=0 connection=6601a411-4571-4da3-9a87-43d36abc0ab0 event=0 ip=198.41.200.43 location=lax01 protocol=quic

2024-06-05T15:12:09.988Z: Request to https://partners.shopify.com/api/cli/graphql completed in 673 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"9bbcd0a2c96ed674373f099e238d9cf8"
 - x-request-id: efc3dcfd-c452-4eed-bde8-0b88f44e08d0-1717600329
    
2024-06-05T15:12:09.995Z: Sending "Partners" GraphQL request:
  query FindOrganization($id: ID!) {
    organizations(id: $id, first: 1) {
      nodes {
        id
        businessName
        website
      }
    }
  }

With variables:
{
  "id": "2075227"
}

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

2024-06-05T15:12:10.219Z: Request to https://partners.shopify.com/api/cli/graphql completed in 220 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"51a8303b3fc017c8585237b93fbbc21e"
 - x-request-id: abdaf525-f179-46f8-b381-e13761e7b685-1717600330
    
2024-06-05T15:12:10.224Z: Sending "Partners" GraphQL request:
  query FindOrganization($orgId: ID!, $shopDomain: String) {
    organizations(id: $orgId, first: 1) {
      nodes {
        id
        businessName
        website
        stores(shopDomain: $shopDomain, first: 1, archived: false) {
          nodes {
            shopId
            link
            shopDomain
            shopName
            transferDisabled
            convertableToPartnerTest
          }
        }
      }
    }
  }

With variables:
{
  "orgId": "2075227",
  "shopDomain": "extension-only-apps.myshopify.com"
}

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

2024-06-05T15:12:10.569Z: Request to https://partners.shopify.com/api/cli/graphql completed in 342 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"078b7b153877298a96fb0b823764a52d"
 - x-request-id: 7d8fc64a-f783-4fc2-99f5-ab52d4597106-1717600330
    
2024-06-05T15:12:10.575Z: Sending "Partners" GraphQL request:
  query fetchSpecifications($api_key: String!) {
    extensionSpecifications(apiKey: $api_key) {
      name
      externalName
      externalIdentifier
      identifier
      gated
      experience
      options {
        managementExperience
        registrationLimit
      }
      features {
        argo {
          surface
        }
      }
    }
  }

With variables:
{
  "api_key": "eb67c601af751312cb419c03********"
}

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

2024-06-05T15:12:11.080Z: Request to https://partners.shopify.com/api/cli/graphql completed in 502 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"6c219b88d956e0c48c1ff61ab7f0b232"
 - x-request-id: 2581cf9e-d9a9-4381-b03f-908347872b3d-1717600330
    
2024-06-05T15:12:11.082Z: The following extension specifications were defined locally but not found in the remote specifications: editor_extension_collection, flow_template, payments_extension, tax_calculation, webhook_subscription
2024-06-05T15:12:11.087Z: Sending "Partners" GraphQL request:
  query activeAppVersion($apiKey: String!) {
    app(apiKey: $apiKey) {
      activeAppVersion {
        appModuleVersions {
          registrationId
          registrationUuid
          registrationTitle
          type
          config
          specification {
            identifier
            name
            experience
            options {
              managementExperience
            }
          }
        }
      }
    }
  }

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

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

2024-06-05T15:12:11.603Z: Request to https://partners.shopify.com/api/cli/graphql completed in 514 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"5495fd96bf726933474c7dace8192d48"
 - x-request-id: d1ac49f3-25dd-418a-b91e-fc1e9203fe52-1717600331
    
2024-06-05T15:12:11.611Z: Reading cached app information for directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:11.612Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:11.614Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:11.617Z: Reading the content of file at shopify.app.extension-only-app.toml...
2024-06-05T15:12:11.617Z: Reading the content of file at shopify.app.toml...
2024-06-05T15:12:11.710Z: Reading the content of file at extensions/product-discount/shopify.extension.toml...
2024-06-05T15:12:11.711Z: Reading the content of file at extensions/product-discount/shopify.extension.toml...
2024-06-05T15:12:11.712Z: Reading the content of file at package.json...
2024-06-05T15:12:11.712Z: Reading the content of file at package.json...
2024-06-05T15:12:11.713Z: Obtaining the dependency manager in directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:11.716Z: Reading the content of file at package.json...
2024-06-05T15:12:11.717Z: Unable to decide project type as no web backend
2024-06-05T15:12:11.717Z: Writing app configuration to /Users/***/Dev/Shopify/extension-only-app/shopify.app.extension-only-app.toml
2024-06-05T15:12:11.719Z: File-writing some content to file at shopify.app.extension-only-app.toml...
╭─ info ───────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Using shopify.app.extension-only-app.toml:                                  │
│                                                                              │
│    • Org:             *** A-F                                             │
│    • App:             extension-only-app                                     │
│    • Dev store:       extension-only-apps.myshopify.com                      │
│    • Update URLs:     Not yet configured                                     │
│                                                                              │
│   You can pass `--reset` to your command to reset your app configuration.    │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2024-06-05T15:12:11.742Z: Port 3457 is free
2024-06-05T15:12:11.743Z: Polling tunnel status for cloudflare (attempt 0): connected
2024-06-05T15:12:11.743Z: Getting a random port...
2024-06-05T15:12:11.743Z: Random port obtained: 55544
2024-06-05T15:12:11.743Z: Getting a random port...
2024-06-05T15:12:11.744Z: Random port obtained: 55545
2024-06-05T15:12:11.748Z: Sending "Partners" GraphQL request:
  query allAppExtensionRegistrations($apiKey: String!) {
    app(apiKey: $apiKey) {
      extensionRegistrations {
        id
        uuid
        title
        type
        draftVersion {
          config
          context
        }
        activeVersion {
          config
          context
        }
      }
      configurationRegistrations {
        id
        uuid
        title
        type
        draftVersion {
          config
          context
        }
        activeVersion {
          config
          context
        }
      }
      dashboardManagedExtensionRegistrations {
        id
        uuid
        title
        type
        activeVersion {
          config
          context
        }
        draftVersion {
          config
          context
        }
      }
    }
  }

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

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

2024-06-05T15:12:12.947Z: Request to https://partners.shopify.com/api/cli/graphql completed in 1198 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"4ec5ff25bed0b12cfdffe314bd90237a"
 - x-request-id: 07e514a9-472c-4aa3-a516-365bd0036e22-1717600331
    
2024-06-05T15:12:12.958Z: Sending "Partners" GraphQL request:
  query activeAppVersion($apiKey: String!) {
    app(apiKey: $apiKey) {
      activeAppVersion {
        appModuleVersions {
          registrationId
          registrationUuid
          registrationTitle
          type
          config
          specification {
            identifier
            name
            experience
            options {
              managementExperience
            }
          }
        }
      }
    }
  }

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

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

2024-06-05T15:12:13.564Z: Request to https://partners.shopify.com/api/cli/graphql completed in 603 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"5495fd96bf726933474c7dace8192d48"
 - x-request-id: d9c4b55d-2bb8-4fc0-8101-433336b332f9-1717600333
    
2024-06-05T15:12:13.570Z: Sending "Partners" GraphQL request:
  query activeAppVersion($apiKey: String!) {
    app(apiKey: $apiKey) {
      activeAppVersion {
        appModuleVersions {
          registrationId
          registrationUuid
          registrationTitle
          type
          config
          specification {
            identifier
            name
            experience
            options {
              managementExperience
            }
          }
        }
      }
    }
  }

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

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

2024-06-05T15:12:14.168Z: Request to https://partners.shopify.com/api/cli/graphql completed in 596 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"5495fd96bf726933474c7dace8192d48"
 - x-request-id: 7e663a39-d2c7-4595-a220-2da09ef2f8df-1717600333
    
2024-06-05T15:12:14.176Z: Storing app information for directory /Users/***/Dev/Shopify/extension-only-app:{
  "directory": "/Users/***/Dev/Shopify/extension-only-app",
  "previousAppId": "eb67c601af751312cb419c03********"
}
2024-06-05T15:12:14.191Z: Obtaining the dependency manager in directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:14.196Z: 
Running system process:
  · Command: ruby -v
  · Working directory: /Users/***/Dev/Shopify/extension-only-app

2024-06-05T15:12:14.354Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 134 ms
With response headers:
 - x-request-id: a107f083-7f13-4bb9-94fd-cad43534ce5e
    
2024-06-05T15:12:14.355Z: Analytics event sent: {
  "command": "app dev",
  "time_start": 1717600327029,
  "time_end": 1717600334188,
  "total_time": 7159,
  "success": true,
  "cli_version": "3.61.0",
  "ruby_version": "3.3.2",
  "node_version": "21.7.3",
  "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": "ff4427db6e6ef5202d9a8b8a652b7a01********",
  "env_cloud": "localhost",
  "env_package_manager": "npm",
  "env_is_global": false,
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_app_all_configs_any": true,
  "cmd_app_all_configs_clients": "{\"shopify.app.extension-only-app.toml\":\"eb67c601af751312cb419c0324ba4002\",\"shopify.app.toml\":\"9f620f29ace0ed63da098523cea185a1\"}",
  "cmd_app_linked_config_used": true,
  "cmd_app_linked_config_name": "shopify.app.extension-only-app.toml",
  "cmd_app_linked_config_git_tracked": true,
  "cmd_app_linked_config_source": "flag",
  "partner_id": 2075***,
  "api_key": "****",
  "app_extensions_any": true,
  "app_extensions_breakdown": "{\"function\":1}",
  "app_extensions_count": 1,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": true,
  "app_extensions_function_count": 1,
  "app_extensions_theme_any": false,
  "app_extensions_theme_count": 0,
  "app_extensions_ui_any": false,
  "app_extensions_ui_count": 0,
  "app_name_hash": "1f808c16256d5a7e8a50813c7c53f74fa54e506c",
  "app_path_hash": "70ca1f26bca1446fddabe992d570c04954d7417c",
  "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,
  "cmd_deploy_include_config_used": true,
  "cmd_deploy_config_modules_breakdown": "[\"access_scopes\",\"application_url\",\"auth\",\"embedded\",\"handle\",\"name\",\"pos\",\"webhooks\"]",
  "cmd_dev_urls_updated": false,
  "store_fqdn_hash": "8709ce6901f6d7983f5df5c8d4808a00515cc8b0",
  "cmd_app_dependency_installation_skipped": false,
  "cmd_app_reset_used": false,
  "cmd_all_timing_network_ms": 5956,
  "cmd_all_timing_prompts_ms": 0,
  "cmd_all_launcher": "npm",
  "cmd_all_topic": "app",
  "cmd_all_plugin": "@shopify/cli",
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "70ca1f26bca1446fddabe992d570c04954d7417c",
  "cmd_all_timing_active_ms": 1202,
  "cmd_all_exit": "ok",
  "args": "--verbose",
  "app_name": "extension-only-app",
  "store_fqdn": "extension-only-apps.myshopify.com",
  "env_plugin_installed_all": "[\"@shopify/cli\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2024-06-05T15:12:14.362Z: Sending "Partners" GraphQL request:
  query allAppExtensionRegistrations($apiKey: String!) {
    app(apiKey: $apiKey) {
      extensionRegistrations {
        id
        uuid
        title
        type
        draftVersion {
          config
          context
        }
        activeVersion {
          config
          context
        }
      }
      configurationRegistrations {
        id
        uuid
        title
        type
        draftVersion {
          config
          context
        }
        activeVersion {
          config
          context
        }
      }
      dashboardManagedExtensionRegistrations {
        id
        uuid
        title
        type
        activeVersion {
          config
          context
        }
        draftVersion {
          config
          context
        }
      }
    }
  }

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

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

2024-06-05T15:12:15.787Z: Request to https://partners.shopify.com/api/cli/graphql completed in 1423 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"4ec5ff25bed0b12cfdffe314bd90237a"
 - x-request-id: c7abb7dc-4d4a-4e51-87d8-3b244068d864-1717600334
    
2024-06-05T15:12:15.810Z: 
Running system process:
  · Command: npm exec -- javy-cli --version
  · Working directory: /Users/***/Dev/Shopify/extension-only-app

08:12:15 │ graphiql         │ 2024-06-05T15:12:15.803Z: Setting up GraphiQL HTTP server on port 3457...
08:12:15 │ graphiql         │ GraphiQL server started on port 3457
2024-06-05T15:12:15.825Z: Sending "Partners" GraphQL request:
  mutation DevelopmentStorePreviewUpdate($input: DevelopmentStorePreviewUpdateInput!) {
    developmentStorePreviewUpdate(input: $input) {
      app {
        id
        developmentStorePreviewEnabled
      }
      userErrors {
        message
        field
      }
    }
  }

With variables:
{
  "input": {
    "apiKey": "eb67c601af751312cb419c0324ba4002",
    "enabled": true
  }
}

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

2024-06-05T15:12:16.405Z: Request to https://partners.shopify.com/api/cli/graphql completed in 579 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"2fb422b368afff9a209342b6f411e9f4"
 - x-request-id: ddd41502-b0c0-42f7-9733-962fe6e78647-1717600335
    
08:12:17 │ product-discount │ Building function product-discount...
08:12:17 │ product-discount │ Building GraphQL types...
2024-06-05T15:12:17.267Z: 
Running system process:
  · Command: npm exec -- graphql-code-generator --config package.json
  · Working directory: /Users/***/Dev/Shopify/extension-only-app/extensions/product-discount

2024-06-05T15:12:17.270Z: Sending "Partners" GraphQL request:
  mutation ExtensionUpdateDraft(
    $apiKey: String!
    $registrationId: ID!
    $config: JSON!
    $context: String
    $handle: String
  ) {
    extensionUpdateDraft(
      input: {apiKey: $apiKey, registrationId: $registrationId, config: $config, context: $context, handle: $handle}
    ) {
      userErrors {
        field
        message
      }
    }
  }

With variables:
{
  "apiKey": "*****",
  "config": "{\"scopes\":\"\",\"redirect_url_allowlist\":[\"https://shopify.dev/apps/default-app-home/api/auth\"]}",
  "handle": "app-access",
  "context": "",
  "registrationId": "82286313473"
}

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

08:12:18 │product-discoun │ (node:13317) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative
                         instead.
08:12:18 │ product-discount │ (Use `node --trace-deprecation ...` to show where the warning was created)
08:12:18 │ product-discount │ (node:13317) Warning: Label '@graphql-tools/load: collectSources' already exists for console.time()
2024-06-05T15:12:18.224Z: Request to https://partners.shopify.com/api/cli/graphql completed in 953 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"68998c1ebe8616191e40bd4a51eb4d42"
 - x-request-id: 39cd043f-763c-4fd1-8e80-ad95bc40fee8-1717600337
    
08:12:18 │ app-access       │ 2024-06-05T15:12:18.263Z: Watching extension: app-access for:
08:12:18 │ app-access       │ Rebuild and Redeploy Paths:
08:12:18 │ app-access       │
08:12:18 │ app-access       │
08:12:18 │ app-access       │ Redeploy Paths:
08:12:18 │ app-access       │ 	/Users/***/Dev/Shopify/extension-only-app/shopify.app.extension-only-app.toml
08:12:18 │ product-discount │ Bundling JS function...
2024-06-05T15:12:18.307Z: Generating dist/function.js using generated module:
2024-06-05T15:12:18.307Z: 
import __runFunction from "@shopify/shopify_function/run"

import { run as runRun } from "user-function"
export function run() { return __runFunction(runRun) }
2024-06-05T15:12:18.518Z: Killing process 13291: npm exec -- graphql-code-generator --config package.json
08:12:18 │ extensions       │ 2024-06-05T15:12:18.521Z: Closing file watching for extension with ID dev-56dd87d2-d762-4a90-83dd-f89686a13e4c
08:12:18 │ extensions       │ 2024-06-05T15:12:18.524Z: File watching closed for extension with dev-56dd87d2-d762-4a90-83dd-f89686a13e4c
2024-06-05T15:12:18.528Z: Sending "Partners" GraphQL request:
  mutation DevelopmentStorePreviewUpdate($input: DevelopmentStorePreviewUpdateInput!) {
    developmentStorePreviewUpdate(input: $input) {
      app {
        id
        developmentStorePreviewEnabled
      }
      userErrors {
        message
        field
      }
    }
  }

With variables:
{
  "input": {
    "apiKey": "eb67c601af751312cb419c0324ba4002",
    "enabled": false
  }
}

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

2024-06-05T15:12:19.780Z: Request to https://partners.shopify.com/api/cli/graphql completed in 1251 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"afcf3f573037c2fd7bf79ab2c778db7a"
 - x-request-id: 70dc5e00-1701-4aeb-b439-7caa505beb99-1717600338
    

╭─ error ───────────────────────────────────────────────────────────────────────╮
│                                                                               │
│  Build failed with 1 error:                                                   │
│  <stdin>:2:26: ERROR: Could not resolve "@shopify/shopify_function/run"       │
│                                                                               │
│  To investigate the issue, examine this stack trace:                          │
│    at <stdin>:2:26: ERROR: Could not resolve "                                │
│    at failureErrorWithLog (../../../.nvm/versions/node/v21.7.3/lib/node_modu  │
│    les/@shopify/cli/node_modules/esbuild/lib/main.js:1650)                    │
│    at (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@shopify/cli/nod  │
│    e_modules/esbuild/lib/main.js:1058)                                        │
│    at (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@shopify/cli/nod  │
│    e_modules/esbuild/lib/main.js:1003)                                        │
│    at buildResponseToResult (../../../.nvm/versions/node/v21.7.3/lib/node_mo  │
│    dules/@shopify/cli/node_modules/esbuild/lib/main.js:1056)                  │
│    at (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@shopify/cli/nod  │
│    e_modules/esbuild/lib/main.js:1085)                                        │
│    at <computed> (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@shop  │
│    ify/cli/node_modules/esbuild/lib/main.js:703)                              │
│    at handleIncomingPacket (../../../.nvm/versions/node/v21.7.3/lib/node_mod  │
│    ules/@shopify/cli/node_modules/esbuild/lib/main.js:763)                    │
│    at readFromStdout (../../../.nvm/versions/node/v21.7.3/lib/node_modules/@  │
│    shopify/cli/node_modules/esbuild/lib/main.js:679)                          │
│    at emit (node:events:519)                                                  │
│    at emit (node:domain:488)                                                  │
│                                                                               │
╰───────────────────────────────────────────────────────────────────────────────╯

2024-06-05T15:12:19.806Z: Obtaining the dependency manager in directory /Users/***/Dev/Shopify/extension-only-app...
2024-06-05T15:12:19.809Z: 
Running system process:
  · Command: ruby -v
  · Working directory: /Users/***/Dev/Shopify/extension-only-app

2024-06-05T15:12:19.820Z: Reporting unhandled error to Bugsnag: Build failed with 1 error:
<stdin>:2:26: ERROR: Could not resolve "@shopify/shopify_function/run"
2024-06-05T15:12:19.841Z: Obtaining the dependency manager in directory /Users/***/Dev/Shopify/extension-only-app...
    Error: Build failed with 1 error:
    <stdin>:2:26: ERROR: Could not resolve "@shopify/shopify_function/run"

I wonder how I got 2 .toml files, should I delete one?

Thanks for your assistance!

p.s. some background: I migrated from an Intel Mac to M2 recently and removed old homebrew for Arm64 version. I also uninstalled old shopify-cli brew package and installed the new shopify-cli with npm -g instead.

@gonzaloriestra
Copy link
Contributor

@Shopify/shopify-functions any idea about this error?

@jordanaf808 unless you have two different configurations, you only need a single shopify.app.toml file.

@andrewhassan
Copy link
Contributor

@jordanaf808 would it be possible to post your package.json for the function? Also, do you see the @shopify/shopify_function package in your app's node_modules directory?

@jordanaf808
Copy link
Author

jordanaf808 commented Jun 6, 2024

@jordanaf808 would it be possible to post your package.json for the function?

Yes here is /extensions/product-discount/package.json:

  "dependencies": {
    "@shopify/shopify_function": "0.1.0",
    "javy": "0.1.1"
  }

Also, do you see the @shopify/shopify_function package in your app's ./node_modules directory?

And Yes:
node_modules-shopify_functions

In my root package.json I noticed the cli version 3.58.0 didn't match the updated version I installed 3.61.0, so I edited it:

  "dependencies": {
    "@shopify/app": ">=3.58.0"
  },
  "trustedDependencies": [
    "@shopify/plugin-cloudflare"
  ],

I've only used Node v20 and v21, but shopify app info shows it uses Node v22?

CURRENT APP CONFIGURATION          
Configuration file   shopify.app.extension-only-app.toml
App name             extension-only-app
Client ID            *******
Access scopes
Dev store            extension-only-apps.myshopify.com
Update URLs          Not yet configured
Partners account    *******

YOUR PROJECT                       
Root location   /Shopify/extension-only-app

function_external
📂 product-discount   extensions/product-discount
     config file      shopify.extension.toml

TOOLING AND SYSTEM                 
Shopify CLI       3.61.0
Package manager   npm
OS                darwin-arm64
Shell             /bin/zsh
Node version      v22.2.0

@jordanaf808
Copy link
Author

@Shopify/shopify-functions any idea about this error?

@jordanaf808 unless you have two different configurations, you only need a single shopify.app.toml file.

I created a whole new Product Discount Function project (that had only one .toml file), in a new folder from scratch using the cli, and got the same @Shopify/shopify-functions/run error

@jordanaf808
Copy link
Author

jordanaf808 commented Jun 6, 2024

I am able to create an extension-only App with shopify app init and install it on my dev store if I run shopify app dev before shopify generate app extension.
But once I run the generate app extension command I get the same error as before:

% shopify generate app extension

?  Type of extension?
✔  Discount products - Function

?  Name your extension:
✔  product-discount

?  What would you like to work in?
✔  JavaScript

╭─ success ─────────────────────────────────────────────────────────────────────╮
│                                                                               │
│  Your extension was created in extensions/product-discount.                   │
│                                                                               │
╰───────────────────────────────────────────────────────────────────────────────╯

% shopify app dev
╭─ info ────────────────────────────────────────────────────────────────────────╮
│                                                                               │
│  Using shopify.app.toml:                                                      │
│                                                                               │
│    • Org:             Jordan A-F                                              │
│    • App:             extension-app                                           │
│    • Dev store:       ***.myshopify.com                       │
│    • Update URLs:     Not yet configured                                      │
│                                                                               │
│   You can pass `--reset` to your command to reset your app configuration.     │
│                                                                               │
╰───────────────────────────────────────────────────────────────────────────────╯

✔ Created extension product-discount.
12:20:29graphiqlGraphiQL server started on port 3457
12:20:31product-discountBuilding function product-discount...
12:20:31product-discountBuilding GraphQL types...
12:20:32product-discountBundling JS function...

╭─ error ───────────────────────────────────────────────────────────────────────╮
│                                                                               │
│  Build failed with 1 error:                                                   │
│  <stdin>:2:26: ERROR: Could not resolve "@shopify/shopify_function/run"       │
│                                                                               │
│  To investigate the issue, examine this stack trace:                          │
│    at <stdin>:2:26: ERROR: Could not resolve "                                │
│    at failureErrorWithLog                                                     │
│    (../../../../../opt/homebrew/Cellar/shopify-cli/3.61.0/libexec/lib/node_m  │
│    odules/@shopify/cli/node_modules/esbuild/lib/main.js:1650)  

@andrewhassan
Copy link
Contributor

Thanks @jordanaf808! We'll take a closer look to see why this is happening.

@gonzaloriestra gonzaloriestra added the Area: Functions issues with functions label Jul 3, 2024
@pieperz
Copy link

pieperz commented Jul 3, 2024

I am running in to this same issue with Shopify CLI version: 3.63.2

I also tried node@18 and had same issues.

And I tried Installed with homebrew and with npm -g.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Functions issues with functions Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants