Cannot start subscription app extension with the new Shopify App Cli

d_tehrani
Shopify Partner
56 1 13

I've been running into dependencies issues since I upgraded my Shopify App Cli to the latest version (2.0.2).
I understand that this is a complicated problem, but I would appreciate it if someone could give me some information related to this issue.

 

This command ran with ID: 09863
Please include this information in any issues/report along with relevant logs
/usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/tasks/find_npm_packages.rb:82:in `list_packages': npm ERR! peer dep missing: subscriptions-transport-ws@^0.9.0, required by @apollo/client@3.3.21 (RuntimeError)
npm ERR! peer dep missing: @sewing-kit/plugin-javascript@^0.3.0, required by @remote-ui/web-workers@1.5.4
npm ERR! peer dep missing: @sewing-kit/plugin-webpack@^0.1.0, required by @remote-ui/web-workers@1.5.4
npm ERR! peer dep missing: @sewing-kit/plugins@^0.1.0, required by @remote-ui/web-workers@1.5.4
npm ERR! peer dep missing: webpack-virtual-modules@^0.4.0, required by @remote-ui/web-workers@1.5.4
npm ERR! peer dep missing: react@^16.9.0, required by @shopify/polaris@6.5.0
npm ERR! peer dep missing: react@^16.14.0, required by react-dom@16.14.0
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/result.rb:416:in `block in wrap'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/result.rb:429:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/tasks/find_npm_packages.rb:73:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/method_object.rb:56:in `block in call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/result.rb:416:in `block in wrap'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/method_object.rb:56:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/tasks/find_npm_packages.rb:44:in `exactly_one_of'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/tasks/find_npm_packages.rb:18:in `exactly_one_of'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/features/argo.rb:57:in `renderer_package'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/models/specification_handlers/default.rb:64:in `renderer_package'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/models/specification_handlers/default.rb:69:in `argo_runtime'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/models/specification_handlers/default.rb:46:in `choose_port?'
from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/delegate.rb:87:in `method_missing'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/commands/serve.rb:47:in `find_available_port'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/result.rb:416:in `block in wrap'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/result.rb:173:in `then'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/project_types/extension/commands/serve.rb:29:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/sub_command.rb:13:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/command.rb:19:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:16:in `block (2 levels) in call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:37:in `block (2 levels) in with_logging'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb:169:in `with_id'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:36:in `block in with_logging'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-ui/lib/cli/ui.rb:176:in `log_output_to'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:35:in `with_logging'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:15:in `block in call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:45:in `block (2 levels) in with_traps'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:55:in `twrap'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:44:in `block in with_traps'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:55:in `twrap'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:43:in `with_traps'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:14:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/core/executor.rb:15:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/core/entry_point.rb:24:in `block in call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/core/monorail.rb:32:in `log'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/lib/shopify-cli/core/entry_point.rb:23:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/bin/shopify:33:in `block in <top (required)>'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:75:in `handle_abort'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:21:in `call'
from /usr/local/Cellar/shopify-cli/2.0.2/gems/shopify-cli-2.0.2/bin/shopify:32:in `<top (required)>'
from /usr/local/bin/shopify:6:in `load'
from /usr/local/bin/shopify:6:in `<main>'

Replies 10 (10)

matart
Shopify Staff (Retired)
31 4 5

Hey @d_tehrani 

 

What command is causing this error?

To learn more visit the Shopify Help Center or the Community Blog.

d_tehrani
Shopify Partner
56 1 13

Hi.

Sorry about the insufficient information.

 

shopify extension serve

is causing the error.

d_tehrani
Shopify Partner
56 1 13

@matart 

I switched to yarn and the dependencies issues seem to be solved.

 

But I'm still not able to develop my subscription app extension since I get the error below.

 

When I run

shopify extension serve 

, go to the nrgok URL that is shown and try to view the extension, I get this error.

Screen Shot 2021-07-19 at 11.08.44.png

I've updated my cli and dependencies as instructed here 

I'm using the subscription app extension template so I'm assuming the issue is not in the code.

Hope someone could tell me if I'm missing something or doing something wrong.

stijlfigurant
Visitor
1 0 0

Experiencing similar issues.

 

✗ No available ports found to run extension.

 

Which is quite cryptic and I am not able to select a port myself..

 

FYI: running on

  • windows WSL1
  • ruby 2.7.2
  • shopify-cli 2.1.0 (via default install instructions)

Also had issues shopify extension create command to finish initially, similarly as reported by @d_tehrani, yarn helped there - but now stuck not being able to serve

JoeyF
Shopify Staff (Retired)
35 7 12

@d_tehrani , can you please check the following and report back?

 

 1. The .env file (in your extension folder) contains all the required fields (SHOPIFY_API_KEY, SHOPIFY_API_SECRET, SHOP, SCOPES, EXTENSION_TITLE, EXTENSION_UUID) and the values of  SHOPIFY_API_KEY, SHOPIFY_API_SECRET and SHOP are correct.

 2. You are testing your extension with a dev store (and not a real production store)

 3. Your dev store has at least one product

To learn more visit the Shopify Help Center or the Community Blog.

d_tehrani
Shopify Partner
56 1 13

Hi @JoeyF 

I checked the environment variables, and all seem to be correct.
Except that I don't have the uuid, instead, I have the id of my extension which I got when I registered my extension using the 1.xx shopify app cli.
I set my id to the EXTENSION_UUID environment variable. (EXTENSION_UUID = {my extension id})

The error is still occurring.

tanmaymadaan
Visitor
1 0 0

@d_tehrani getting the same error while creating a subscription app - did you find a way to resolve this?

@JoeyF Hey man can you look into what the issue might be with this?

d_tehrani
Shopify Partner
56 1 13

 

Hi. @tanmaymadaan 

No, I still haven't resolved the issue.

 

@JoeyF 

Really appreciate it if you could look into this!

cecy
Shopify Staff (Retired)
5 1 2

Hello!

It sounds like the `EXTENSION_UUID` was missing from your `.env` file. The `EXTENSION_UUID` is different than the extension ID when you register. So if you manually set this value, please remove it from your `.env` file.

What you need to do is run `shopify extension connect`, this will look up the correct `EXTENSION_UUID` for you. I believe this is a newer command, so you may need to upgrade your CLI to the latest version to ensure you can run the command.

I would recommend removing your current `.env` file and running `shopify extension connect` in your extension project. This should regenerate the `.env` file with the correct UUID value.

To learn more visit the Shopify Help Center or the Community Blog.

Trish_Ta
Shopify Staff
58 13 27

@d_tehrani It looks to me like the following is happening:

1. You call `shopify extension serve`

2. You click on the tunnel url and get redirected to your development shop

3. You open your extension and see the error

Can you confirm? If the error is showing up when you open the extension then could you see if there's any errors thrown in the browser? This might help us debug.

Trish | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog