-
Notifications
You must be signed in to change notification settings - Fork 112
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
Comments
Hi! Thanks for creating the issue. But I'm not able to reproduce it, even with a very similar environment:
|
Yes, and I tried with Typescript as well.
the last time i used the
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. |
@Shopify/shopify-functions any idea about this error? @jordanaf808 unless you have two different configurations, you only need a single |
@jordanaf808 would it be possible to post your |
Yes here is "dependencies": {
"@shopify/shopify_function": "0.1.0",
"javy": "0.1.1"
}
In my root package.json I noticed the cli version "dependencies": {
"@shopify/app": ">=3.58.0"
},
"trustedDependencies": [
"@shopify/plugin-cloudflare"
], I've only used Node v20 and v21, but 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 |
I created a whole new Product Discount Function project (that had only one |
I am able to create an extension-only App with % 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:29 │ graphiql │ GraphiQL server started on port 3457
12:20:31 │ product-discount │ Building function product-discount...
12:20:31 │ product-discount │ Building GraphQL types...
12:20:32 │ 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 │
│ (../../../../../opt/homebrew/Cellar/shopify-cli/3.61.0/libexec/lib/node_m │
│ odules/@shopify/cli/node_modules/esbuild/lib/main.js:1650) |
Thanks @jordanaf808! We'll take a closer look to see why this is happening. |
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. |
Please confirm that you have:
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 tutorialActual 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: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
Reproduction steps
shopify app init
shopify app generate extension
shopify app dev
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
The text was updated successfully, but these errors were encountered: