Shopify app template-php error Missing values for: scope

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?

You might need to deploy first via

npm run deploy 

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

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.