What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: shopify app template-php error Missing values for: scope

shopify app template-php error Missing values for: scope

vitaliidev
Shopify Partner
3 0 0

I'm trying to use Shopify app PHP template from here, but it continuously fail on

npm run dev

command with this error:
Cannot initialize Shopify API Library. Missing values for: scope

Thing is that scopes are in place in .env:
SCOPES = read_products,write_products

What could be wrong here?

 

Replies 3 (3)

Dev49
Shopify Partner
5 0 1

You might need to deploy first via

npm run deploy 

 

vitaliidev
Shopify Partner
3 0 0

Thanks for the reply. I've tried that, it doesn't work

vitaliidev
Shopify Partner
3 0 0

Update: Issue is kind of resolved.
I've tried to build the app before, but with constant errors.
Now, after "npm run build --api-key=REPLACE_ME" and then deploy "npm run deploy" scopes appeared on the app's API access page and "npm run dev" started successfully. Not sure where the problem was, I haven't changed neither .env nor .toml configs.