[422] API request client error with Shopify CLI

Hi,

I’ve installed the Shopify CLI, used this command to log in:

shopify theme dev --store {store}

I log in via the browser and I get an answer saying:

✔ Logged in

But then immediately after I get:

[422] API request client error

That error keeps coming up if I run “shopify theme dev”. I’ve tried logging out and in again with “shopify auth logout”, no dice.

If I run:

shopify theme info

It says I’m logged in, and I can push the theme to the store.

Shopify CLI version: 3.44.1

Anyone know why this is happening and how I can solve it?

@Soundsprinkler do you still facing the issue?
which version of Shopify CLI client are you using?

I have the same error here

Shopify CLI 3.44.1

OS darwin-arm64

Shell /bin/zsh

Node version v19.7.0

Ruby version 3.2.1

Trying to setup a new development store but everytime i tried ‘shopify theme dev’ command, i have the 422 API Error Message

I’ve managed to solve it this morning.

All details here : https://community.shopify.com/post/1976188

Hi, any luck on this? My friend got exactly the same problem.

Solved it by manually uploading the theme via the admin, logging out with the CLI and logging back in again but with the theme ID:

shopify theme dev --store {store} --theme {theme-id}

Thank you so much, we tried your solution and it finally worked!

Your solution made a lot of sense because when we run

shopify theme info

we get

Development Theme ID Not set

which means we should set theme ID with

shopify theme dev

Brand new to shopify cli
Its crazy I was trying to do this, even thought it was staring right at face.

I didnt know how to set theme id.
Finally i did shopify theme push to get the theme id

And then I ran command by @Soundsprinkler
Works now.