# Get function id from other app

**URL:** <https://community.shopify.dev/t/get-function-id-from-other-app/15730>\
**Category:** Functions\
**Tags:** discount-functions\
**Created:** [May 21, 2025, 8:46am UTC](https://community.shopify.dev/t/get-function-id-from-other-app/15730 "2025-05-21T08:46:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrownTheFlower](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/browntheflower/32/4300_2.png) [@BrownTheFlower](https://community.shopify.dev/u/BrownTheFlower)\
**Post date:** [May 21, 2025, 8:46am UTC](https://community.shopify.dev/t/get-function-id-from-other-app/15730/1 "2025-05-21T08:46:31Z")

</div>

Hello, im creating a shopify discount function on my custom app (app1) by shopify app generate extension but always get this error npm exec --graphql-code-generator --config package.json. So I try to create new app and it works or even i copy extension from app2 to app1 and build, i still got above error. However, when i back to app1 and query shopifyFunctions to get its id and pass to discountCodeApp. Is that possible to get shopify function from app2 at app1 or anyway to fix above error

 ![image](https://global.discourse-cdn.com/shopifycommunity/original/2X/0/0359052307781af86b4cd58708846c8ecb512f3f.png)  
 ![image](https://global.discourse-cdn.com/shopifycommunity/original/2X/6/63dd82c2cf9f435e1b4817192005cf3e46c9b8c2.png)  
 ![image](https://global.discourse-cdn.com/shopifycommunity/original/2X/f/fcf0f83413635f024ddc863e1f74ccd61d09e48a.png)

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [May 22, 2025, 8:25pm UTC](https://community.shopify.dev/t/get-function-id-from-other-app/15730/2 "2025-05-22T20:25:30Z")

</div>

Hey @BrownTheFlower 👋 - thanks for reaching out, that does seem odd. Can you let me know if you’ve taken a look at this issue in our CLI Github repo and if any of the solutions work for you?

> <https://github.com/Shopify/cli/issues/2095>
>
> \### Please confirm that you have:
> 
> \- \[X\] 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.)
> \- \[X\] Reproduced the issue in \[the latest CLI version\](https://www.npmjs.com/package/@shopify/cli).
> 
> \### In which of these areas are you experiencing a problem?
> 
> Extension
> 
> \### Expected behavior
> 
> Create payment extension
> 
> \### Actual behavior
> 
> Using \`npm run generate extension \` 
> 
> 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
> 
> Usage: npm \<command\>
> 
> where \<command\> is one of:
> access, adduser, audit, bin, bugs, c, cache, ci, cit,
> clean-install, clean-install-test, completion, config,
> create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
> edit, explore, fund, get, help, help-search, hook, i, init,
> install, install-ci-test, install-test, it, link, list, ln,
> login, logout, ls, org, outdated, owner, pack, ping, prefix,
> profile, prune, publish, rb, rebuild, repo, restart, root,
> run, run-script, s, se, search, set, shrinkwrap, star,
> stars, start, stop, t, team, test, token, tst, un,
> uninstall, unpublish, unstar, up, update, v, version, view,
> whoami
> 
> npm \<command\> -h quick help on \<command\>
> npm -l display full usage info
> npm help \<term\> search for help on \<term\>
> npm help npm involved overview
> 
> \### Verbose output
> 
> \`\`\`shell
> \> shopify app generate extension --verbose
> 
> 2023-06-05T12:47:32.172Z: Running command app generate extension
> 2023-06-05T12:47:32.199Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
> \[\]
> 
> 2023-06-05T12:47:32.204Z: Getting session store...
> 2023-06-05T12:47:32.212Z: 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"
> \]
> For applications:
> {
> "partnersApi": {
> "scopes": \[\]
> }
> }
> 
> 2023-06-05T12:47:32.218Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
> 2023-06-05T12:47:32.219Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
> With request headers:
> - User-Agent: Shopify CLI; v=3.46.2
> - Keep-Alive: timeout=30
> - Sec-CH-UA-PLATFORM: win32
> - Content-Type: application/json
> 
> 2023-06-05T12:47:32.568Z: Request to https://accounts.shopify.com/oauth/introspection completed in 328 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/"e7d0d6cb4737081f83ef93c065135d26"
> - x-request-id: cfe9fe12-cb73-46e3-9dc9-6eab876bebdf
>     
> 2023-06-05T12:47:32.579Z: The identity token is valid: true
> 2023-06-05T12:47:32.580Z:
> The validation of the token for application/identity completed with the following results:
> \- It's expired: false
> \- It's invalid in identity: false
>   
> 2023-06-05T12:47:32.582Z: Verifying that the user has a Partner organization
> 2023-06-05T12:47:32.584Z: Sending "Partners" GraphQL request:
> {
> organizations(first: 1) {
> nodes {
> id
> }
> }
> }
> 
> With request headers:
> - User-Agent: Shopify CLI; v=3.46.2
> - Keep-Alive: timeout=30
> - Sec-CH-UA-PLATFORM: win32
> - Content-Type: application/json
> 
> 2023-06-05T12:47:32.972Z: Request to https://partners.shopify.com/api/cli/graphql completed in 356 ms
> With response headers:
> - cache-control: max-age=0, private, must-revalidate
> - content-type: application/json; charset=utf-8
> - etag: W/"c513109d2db31ce33de23913f573ea25"
> - x-request-id: 2865d65d-db4f-457c-9662-36df7089a32e
>     
> 2023-06-05T12:47:32.977Z: Reading cached app information for directory C:/...
> 2023-06-05T12:47:32.979Z: Sending "Partners" GraphQL request:
> query FindOrganization($id: ID!) {
> organizations(id: $id, first: 1) {
> nodes {
> id
> businessName
> website
> betas {
> cliTunnelAlternative
> }
> }
> }
> }
> 
> With variables:
> {
> "id": "1200067"
> }
> 
> With request headers:
> - User-Agent: Shopify CLI; v=3.46.2
> - Keep-Alive: timeout=30
> - Sec-CH-UA-PLATFORM: win32
> - Content-Type: application/json
> 
> 2023-06-05T12:47:33.252Z: Request to https://partners.shopify.com/api/cli/graphql completed in 262 ms
> With response headers:
> - cache-control: max-age=0, private, must-revalidate
> - content-type: application/json; charset=utf-8
> - etag: W/"e564d4515bde597b7039b6385b15b802"
> - x-request-id: f7823b78-7e71-4560-8530-b06d1ac7f185
>     
> 2023-06-05T12:47:33.254Z: Sending "Partners" GraphQL request:
> query FindApp($apiKey: String!) {
> app(apiKey: $apiKey) {
> id
> title
> apiKey
> organizationId
> apiSecretKeys {
> secret
> }
> appType
> grantedScopes
> betas {
> unifiedAppDeployment
> }
> }
> }
> 
> With variables:
> {
> "apiKey": "c8de9a21db20bbd0c5b74c9cb432f18b"
> }
> 
> With request headers:
> - User-Agent: Shopify CLI; v=3.46.2
> - Keep-Alive: timeout=30
> - Sec-CH-UA-PLATFORM: win32
> - Content-Type: application/json
> 
> 2023-06-05T12:47:34.014Z: Request to https://partners.shopify.com/api/cli/graphql completed in 750 ms
> With response headers:
> - cache-control: max-age=0, private, must-revalidate
> - content-type: application/json; charset=utf-8
> - etag: W/"392f21ed991bf35946d1147cc67e87cb"
> - x-request-id: 2a67889c-06c6-47b0-83fe-33cf561c7f26
>     
> 2023-06-05T12:47:34.020Z: Obtaining the dependency manager in directory C:/Users/radua/Desktop/Fluxsales Functions/hide-payments...
> ╭─ info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
> │ │
> │ Using your previous dev settings: │
> │ │
> │ • Org: FLUXSALES │
> │ • App: hide-payments │
> │ │
> │ To reset your default dev config, run \`yarn dev --reset\` │
> │ │
> ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
> 
> 2023-06-05T12:47:34.239Z: Sending "Partners" GraphQL request:
> query fetchSpecifications($api\_key: String!) {
> extensionSpecifications(apiKey: $api\_key) {
> name
> externalName
> externalIdentifier
> identifier
> gated
> options {
> managementExperience
> registrationLimit
> }
> features {
> argo {
> surface
> }
> }
> }
> }
> 
> With variables:
> {
> "api\_key": "c8de9a21db20bbd0c5b74c9cb432f18b"
> }
> 
> With request headers:
> - User-Agent: Shopify CLI; v=3.46.2
> - Keep-Alive: timeout=30
> - Sec-CH-UA-PLATFORM: win32
> - Content-Type: application/json
> 
> 2023-06-05T12:47:34.536Z: Request to https://partners.shopify.com/api/cli/graphql completed in 286 ms
> With response headers:
> - cache-control: max-age=0, private, must-revalidate
> - content-type: application/json; charset=utf-8
> - etag: W/"105e4d6110087756a8c7f619b7f47ae6"
> - x-request-id: 70e36500-8611-49d1-978c-488dfd99c893
>     
> 2023-06-05T12:47:34.802Z: Reading the content of file at shopify.app.toml...
> 2023-06-05T12:47:34.832Z: Reading the content of file at package.json...
> 2023-06-05T12:47:34.835Z: Reading the content of file at package.json...
> 2023-06-05T12:47:34.837Z: Obtaining the dependency manager in directory C:/Users/radua/Desktop/Fluxsales Functions/hide-payments...
> 2023-06-05T12:47:35.522Z: Reading the content of file at web/shopify.web.toml...
> 2023-06-05T12:47:35.523Z: Reading the content of file at web/frontend/shopify.web.toml...
> 2023-06-05T12:47:35.523Z: Reading the content of file at node\_modules/shopify-app-template-node/shopify.web.toml...
> 2023-06-05T12:47:35.524Z: Reading the content of file at node\_modules/shopify-frontend-template-react/shopify.web.toml...
> 2023-06-05T12:47:35.525Z: Reading the content of file at node\_modules/shopify-app-template-node/frontend/shopify.web.toml...
> 2023-06-05T12:47:35.570Z: Reading the content of file at package.json...
> 2023-06-05T12:47:35.572Z: Unable to decide project type as multiple web backends
> 2023-06-05T12:47:35.573Z: Sending "Partners" GraphQL request:
> query RemoteTemplateSpecifications($version: String) {
> templateSpecifications(version: $version) {
> identifier
> name
> group
> supportLinks
> types {
> url
> type
> extensionPoints
> supportedFlavors {
> name
> value
> ? Type of extension?
> 
> Analytics
> \> (1) Web Pixel
> 
> Discounts and checkout
> (2) Checkout UI
> (3) Function - Cart and Checkout Validation
> ? Type of extension?
> ✔ Function - Payment customization
> 
> ? Extension name (internal only):
> ✔ payments
> 
> ? What would you like to work in?
> ✔ JavaScript
> 
> 2023-06-05T12:47:54.109Z: Creating directory at extensions/payments...
> 2023-06-05T12:47:54.149Z: Creating directory at C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download...
> 2023-06-05T12:47:54.155Z: Git-cloning repository https://github.com/Shopify/function-examples into C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download...
> 2023-06-05T12:47:54.317Z:
> Running system process:
> · Command: git --version
> · Working directory: 
> 
> 2023-06-05T12:47:59.348Z: Copying template from directory C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default to extensions/payments
> 2023-06-05T12:47:59.370Z: Checking if C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/src/index.test.liquid is a directory...
> 2023-06-05T12:47:59.375Z: Checking if C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/src/index.liquid is a directory...
> 2023-06-05T12:47:59.380Z: Checking if C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/shopify.function.extension.toml.liquid is a directory...
> 2023-06-05T12:47:59.385Z: Checking if C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/schema.graphql is a directory...
> 2023-06-05T12:47:59.391Z: Checking if C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/package.json.liquid is a directory...
> 2023-06-05T12:47:59.396Z: Checking if C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/input.graphql.liquid is a directory...
> 2023-06-05T12:47:59.401Z: Checking if C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/.gitignore is a directory...
> 2023-06-05T12:47:59.411Z: Creating directory at extensions/payments/src...
> 2023-06-05T12:47:59.416Z: Creating directory at extensions/payments/src...
> 2023-06-05T12:47:59.421Z: Creating directory at extensions/payments...
> 2023-06-05T12:47:59.427Z: Copying file from C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/schema.graphql to extensions/payments/schema.graphql...
> 2023-06-05T12:47:59.436Z: Creating directory at extensions/payments...
> 2023-06-05T12:47:59.444Z: Creating directory at extensions/payments...
> 2023-06-05T12:47:59.452Z: Copying file from C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/.gitignore to extensions/payments/.gitignore...
> 2023-06-05T12:47:59.470Z: Reading the content of file at C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/src/index.test.liquid...
> 2023-06-05T12:47:59.526Z: Reading the content of file at C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/src/index.liquid...
> 2023-06-05T12:47:59.535Z: Reading the content of file at C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/shopify.function.extension.toml.liquid...
> 2023-06-05T12:47:59.549Z: Reading the content of file at C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/package.json.liquid...
> 2023-06-05T12:47:59.558Z: Reading the content of file at C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/input.graphql.liquid...
> 2023-06-05T12:47:59.587Z: Copying file from C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/src/index.test.liquid to extensions/payments/src/index.test...
> 2023-06-05T12:47:59.593Z: Copying file from C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/src/index.liquid to extensions/payments/src/index...
> 2023-06-05T12:47:59.599Z: Copying file from C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/shopify.function.extension.toml.liquid to extensions/payments/shopify.function.extension.toml...
> 2023-06-05T12:47:59.606Z: Copying file from C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/package.json.liquid to extensions/payments/package.json...
> 2023-06-05T12:47:59.624Z: Copying file from C:/Users/radua/AppData/Local/Temp/7fc9ea6758a23e1093b647542686938b/download/checkout/javascript/payment-customization/default/input.graphql.liquid to extensions/payments/input.graphql...
> 2023-06-05T12:47:59.645Z: Writing some content to file at extensions/payments/shopify.function.extension.toml...
> 2023-06-05T12:47:59.653Z: Writing some content to file at extensions/payments/package.json...
> 2023-06-05T12:47:59.666Z: Writing some content to file at extensions/payments/src/index.test...
> 2023-06-05T12:47:59.674Z: Writing some content to file at extensions/payments/src/index...
> 2023-06-05T12:47:59.679Z: Writing some content to file at extensions/payments/input.graphql...
> 2023-06-05T12:48:00.046Z: Adding the following dependencies if needed:
> \[
> {
> "name": "@shopify/shopify\_function",
> "version": "0.0.3"
> },
> {
> "name": "javy",
> "version": "0.1.0"
> }
> \]
> With options:
> {
> "packageManager": "yarn",
> "type": "prod",
> "directory": ""
> }
>   
> 2023-06-05T12:48:00.059Z: Reading the content of file at extensions/payments/package.json...
> 2023-06-05T12:48:00.105Z:
> Running system process:
> · Command: yarn add @shopify/shopify\_function@0.0.3 javy@0.1.0 --prod
> 
> 2023-06-05T12:48:23.732Z:
> Running system process:
> · Command: npm exec -- graphql-code-generator --config package.json
> 
> 
> 2023-06-05T12:48:25.131Z: Removing file at extensions/payments...
> ── 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
> 
> Usage: npm \<command\>
> 
> where \<command\> is one of:
> access, adduser, audit, bin, bugs, c, cache, ci, cit,
> clean-install, clean-install-test, completion, config,
> create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
> edit, explore, fund, get, help, help-search, hook, i, init,
> install, install-ci-test, install-test, it, link, list, ln,
> login, logout, ls, org, outdated, owner, pack, ping, prefix,
> profile, prune, publish, rb, rebuild, repo, restart, root,
> run, run-script, s, se, search, set, shrinkwrap, star,
> stars, start, stop, t, team, test, token, tst, un,
> uninstall, unpublish, unstar, up, update, v, version, view,
> whoami
> 
> npm \<command\> -h quick help on \<command\>
> npm -l display full usage info
> npm help \<term\> search for help on \<term\>
> npm help npm involved overview
> 
> Specify configs in the ini-formatted file:
> C:\\Users\\radua\\.npmrc
> or on the command line via: npm \<command\> --key value
> Config info can be viewed via: npm help config
> 
> npm@6.14.18 C:\\Users\\radua\\node\_modules\\npm
> 
> 
> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> 
> 2023-06-05T12:48:25.212Z: Obtaining the dependency manager in directory C:/Users/radua/Desktop/Fluxsales Functions/hide-payments...
> 2023-06-05T12:48:25.510Z: 
> Running system process:
> · Command: ruby -v
> · Working directory: C:/Users/radua/Desktop/Fluxsales Functions/hide-payments
> 
> 2023-06-05T12:48:25.548Z: Obtaining the dependency manager in directory C:/Users/radua/Desktop/Fluxsales Functions/hide-payments...
> 2023-06-05T12:48:25.835Z: 
> Running system process:
> · Command: ruby -v
> 
> 2023-06-05T12:48:26.052Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 204 ms
> With response headers:
> - x-request-id: 98bee140-a65b-47f5-992e-f56aef3d0868
>     
> 2023-06-05T12:48:26.055Z: Analytics event sent: {
> "command": "app scaffold extension",
> "time\_start": 1685969252175,
> "time\_end": 1685969305160,
> "total\_time": 52985,
> "success": false,
> "cli\_version": "3.46.2",
> "ruby\_version": "3.1.1",
> "node\_version": "18.16.0",
> "is\_employee": false,
> "uname": "windows amd64",
> "env\_ci": false,
> "env\_plugin\_installed\_any\_custom": false,
> "env\_plugin\_installed\_shopify": "\[\\"@shopify/app\\",\\"@shopify/cli\\",\\"@shopify/plugin-cloudflare\\",\\"@shopify/plugin-did-you-mean\\",\\"@shopify/plugin-ngrok\\"\]",
> "env\_shell": "cmd.exe",
> "env\_device\_id": "29e54ce758c790f3af833deec60412abaf6f0838",
> "env\_cloud": "localhost",
> "env\_package\_manager": "yarn",
> "cmd\_scaffold\_required\_auth": true,
> "cmd\_scaffold\_template\_custom": false,
> "cmd\_scaffold\_type\_owner": "@shopify/app",
> "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\_function\_custom\_layout": false,
> "app\_extensions\_theme\_any": false,
> "app\_extensions\_theme\_count": 0,
> "app\_extensions\_theme\_custom\_layout": false,
> "app\_extensions\_ui\_any": false,
> "app\_extensions\_ui\_count": 0,
> "app\_extensions\_ui\_custom\_layout": false,
> "app\_name\_hash": "325ab968f84d66d69de8b6430d4e22a64e4d8ece",
> "app\_path\_hash": "ee33374068b641e325e722f702311bf19716c1f5",
> "app\_scopes": "\[\\"write\_products\\"\]",
> "app\_web\_backend\_any": true,
> "app\_web\_backend\_count": 2,
> "app\_web\_custom\_layout": true,
> "app\_web\_frontend\_any": true,
> "app\_web\_frontend\_count": 3,
> "env\_package\_manager\_workspaces": true,
> "cmd\_scaffold\_template\_flavor": "vanilla-js",
> "cmd\_scaffold\_type": "payment\_customization",
> "cmd\_scaffold\_used\_prompts\_for\_type": true,
> "cmd\_all\_launcher": "npm",
> "cmd\_all\_topic": "app generate",
> "cmd\_all\_plugin": "@shopify/app",
> "cmd\_all\_verbose": true,
> "cmd\_all\_path\_override": true,
> "cmd\_all\_path\_override\_hash": "ee33374068b641e325e722f702311bf19716c1f5",
> "args": "--verbose",
> "error\_message": "Command failed with exit code 1: npm exec -- graphql-code-generator --config package.json\\n\\nUsage: npm \<command\>\\n\\nwhere \<command\> is one of:\\n access, adduser, audit, bin, bugs, c, cache, ci, cit,\\n clean-install, clean-install-test, completion, config,\\n create, ddp, dedupe, deprecate, dist-tag, docs, doctor,\\n edit, explore, fund, get, help, help-search, hook, i, init,\\n install, install-ci-test, install-test, it, link, list, ln,\\n login, logout, ls, org, outdated, owner, pack, ping, prefix,\\n profile, prune, publish, rb, rebuild, repo, restart, root,\\n run, run-script, s, se, search, set, shrinkwrap, star,\\n stars, start, stop, t, team, test, token, tst, un,\\n uninstall, unpublish, unstar, up, update, v, version, view,\\n whoami\\n\\nnpm \<command\> -h quick help on \<command\>\\nnpm -l display full usage info\\nnpm help \<term\> search for help on \<term\>\\nnpm help npm involved overview\\n\\nSpecify configs in the ini-formatted file:\\n C:\\\\Users\\\\radua\\\\.npmrc\\nor on the command line via: npm \<command\> --key value\\nConfig info can be viewed via: npm help config\\n\\nnpm@6.14.18 C:\\\\Users\\\\radua\\\\node\_modules\\\\npm\\n",
> "env\_plugin\_installed\_all": "\[\\"@shopify/app\\",\\"@shopify/cli\\",\\"@shopify/plugin-cloudflare\\",\\"@shopify/plugin-did-you-mean\\",\\"@shopify/plugin-ngrok\\"\]",
> "metadata": "{\\"extraPublic\\":{},\\"extraSensitive\\":{}}"
> }
> \`\`\`
> 
> 
> \### Reproduction steps
> 
> 1.Create a new app npm init @shopify/app@latest
> 2.Create a new extension npm run generate extension
> 
> \### Operating System
> 
> Windows 10
> 
> \### Shopify CLI version (check your project's \`package.json\` if you're not sure)
> 
> 3.46.2
> 
> \### Shell
> 
> \_No response\_
> 
> \### Node version (run \`node -v\` if you're not sure)
> 
> v18.16.0
> 
> \### What language and version are you using in your application?
> 
> Node v18.16.0

If not, if you’re able to share the verbose logs when you run `shopify app generate --verbose` here in the thread I can take a look on our end.

Hope this helps - feel free to ping me here if I can help out further 🙂

---

<div class="post-metadata">

**Author:** ![BrownTheFlower](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/browntheflower/32/4300_2.png) [@BrownTheFlower](https://community.shopify.dev/u/BrownTheFlower)\
**Post date:** [May 23, 2025, 1:42am UTC](https://community.shopify.dev/t/get-function-id-from-other-app/15730/3 "2025-05-23T01:42:33Z")

</div>

I found my solution but it weird.

im using `shopify app init` then `shopify app generate extension` and it works. after that, i copy the extension on my source code but i cannot build or deploy cause the same error: `npm exec --graphql-code-generator --config package.json`.

after that, im cd to the function extension folder and install `@shopify/cli` and it can build normaly. im using `pnpm`

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [May 23, 2025, 4:39pm UTC](https://community.shopify.dev/t/get-function-id-from-other-app/15730/4 "2025-05-23T16:39:07Z")

</div>

Thanks for sharing your solution @BrownTheFlower, glad this is resolved! While we primarily test our CLI with npm/yarn (and the Shopify CLI app itself), really appreciate you sharing the solve for other folks who might need it.

Feel free to reach out if you run into any other issues! 😊
