Closed thdoan closed 3 years ago
Hi there, did your yarn seed
run successfully and output what you shared above?
After some investigation, I think I know what might be the root cause of all this -- when I originally ran yarn seed
it failed with this error, possibly because I used the sandbox key/secret in .env
:
$ yarn seed
yarn run v1.22.5
$ chec-seed seeds
Could not push an object to the assets endpoint (Response code 504 (Gateway Time-out)):
- Seeding assets #21. This may take some time...⚠️ Cannot read property 'id' of undefined
error Command failed with exit code 1.
After this, I updated .env
with the standard key/secret and re-ran yarn seed
, which ran successfully:
$ yarn seed
yarn run v1.22.5
$ chec-seed seeds
Could not push an object to the categories endpoint (Response code 422 (Unprocessable Entity)):
Could not push an object to the categories endpoint (Response code 422 (Unprocessable Entity)):
Could not push an object to the categories endpoint (Response code 422 (Unprocessable Entity)):
√ Completed seeding
Added:
9 products
27 assets
Done in 70.70s.
However, I think the products were not linked to the categories, as I have confirmed in the Chec portal:
After assigning products to categories everything looks good now.
Steps to reproduce:
CHEC_PUBLIC_KEY
andCHEC_SECRET_KEY
to your own keys in.env
yarn seed
It should run successfully and output something like this:
yarn dev
Actual behavior: no products are visible in the store. Expected behavior: 9 products should be visible in the store.