Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify App Dev - Encountering Error 2.26

Solved

Shopify App Dev - Encountering Error 2.26

wick_aaron
Shopify Partner
8 0 1

Trying to get started developing apps, and I have gotten most of it started, except that when I use the command

 

 

shopify app dev

 

 

it fails with the error

 

 

<stdin>:2.26: ERROR: Could not resolve "@shopify/shopify_function/run"

 

I have so far tried to uninstall and reinstall Shopify CLI, update NPM, and restart the computer but it still does not seem to want to cooperate.

 

Full response below:

 

PS C:\Users\Aaron\ cliens\Checkout Bundler\checkout-bundler> shopify app dev

╭─ info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                      │
│  Using shopify.app.toml:                                                                                                             │
│                                                                                                                                      │
│    • Org:             Wick Creative                                                                                                  │
│    • App:             Checkout Bundler                                                                                      │
│    • Dev store:       xyz.myshopify.com                                                                                │
│    • Update URLs:     No                                                                                                             │
│                                                                                                                                      │
│   You can pass `--reset` to your command to reset your app configuration.                                                            │
│                                                                                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

╭─ info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                      │
│  To update URLs manually, add the following URLs to shopify.app.toml under auth > redirect_urls and run                              │
│   `shopify app config push`                                                                                                          │
│                                                                                                                                      │
│                                                                                                                                      │
│    • https://whenever-benefits-vertical-ro.trycloudflare.com/auth/callback                                                           │
│    • https://whenever-benefits-vertical-ro.trycloudflare.com/auth/shopify/callback                                                   │
│    • https://whenever-benefits-vertical-ro.trycloudflare.com/api/auth/callback                                                       │
│                                                                                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

13:25:03 │                     remix │ Running pre-dev command: "npx prisma generate"
13:25:03 │                  graphiql │ GraphiQL server started on port 3457
13:25:05 │                       fcb │ Building function fcb...
13:25:05 │                       fcb │ Building GraphQL types...
13:25:06 │                     remix │ Prisma schema loaded from prisma\schema.prisma
13:25:06 │                     remix │ Datasource "db": SQLite database "dev.sqlite" at "file:dev.sqlite"
13:25:06 │                     remix │
13:25:06 │                     remix │ 1 migration found in prisma/migrations
13:25:06 │                     remix │
13:25:06 │                     remix │
13:25:06 │                     remix │ No pending migrations to apply.
13:25:08 │                       fcb │ 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                                                                                                            │
│    (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:1650)            │
│    at (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:1058)         │
│    at (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:1003)         │
│    at buildResponseToResult                                                                                                          │
│    (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:1056)            │
│    at (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:1085)         │
│    at <computed>                                                                                                                     │
│    (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:703)             │
│    at handleIncomingPacket                                                                                                           │
│    (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:763)             │
│    at readFromStdout                                                                                                                 │
│    (../../../../../../../../../Aaron/AppData/Roaming/npm/node_modules/@shopify/cli/node_modules/esbuild/lib/main.js:679)             │
│    at emit (node:events:519)                                                                                                         │
│    at emit (node:domain:488)                                                                                                         │
│                                                                                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

 

Accepted Solution (1)
BSSCommerce-TC
Shopify Partner
225 49 51

This is an accepted solution.

Hi @wick_aaron ,

Check @shopify/shopify_function on file package.json on dependencies section, it like that

 

"dependencies": {
     ...
    "@shopify/shopify_function": "0.1.0",
     ....
}

 

if it is not, please run cmd

 

npm i @shopify/shopify_function

 

 

 

 

 

 

 

 

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


MIDA: Heatmap, Record & Replay |BLOOP Referral Program, Reward |

Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

View solution in original post

Replies 5 (5)

BSSCommerce-TC
Shopify Partner
225 49 51

Hi @wick_aaron ,

Do you see the  @shopify/shopify_function package in your app's node_modules directory?

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


MIDA: Heatmap, Record & Replay |BLOOP Referral Program, Reward |

Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
wick_aaron
Shopify Partner
8 0 1

hmmmm... I do not see that "shopify_function" package, although I do have the @Shopify folder itself with other functions (graphql-client, etc) - was it supposed to be installed when I did the 

 

 

 

npm init @Shopify/app@latest

 

 

 

command?

BSSCommerce-TC
Shopify Partner
225 49 51

This is an accepted solution.

Hi @wick_aaron ,

Check @shopify/shopify_function on file package.json on dependencies section, it like that

 

"dependencies": {
     ...
    "@shopify/shopify_function": "0.1.0",
     ....
}

 

if it is not, please run cmd

 

npm i @shopify/shopify_function

 

 

 

 

 

 

 

 

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


MIDA: Heatmap, Record & Replay |BLOOP Referral Program, Reward |

Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
wick_aaron
Shopify Partner
8 0 1

That did the trick, appreciate your help! Do you happen to know the reason this wasn't there before? 

BSSCommerce-TC
Shopify Partner
225 49 51

Hi @wick_aaron ,

We guess it might be due to your environment. But we’re glad the issue has been resolved.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


MIDA: Heatmap, Record & Replay |BLOOP Referral Program, Reward |

Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency