-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import Products populate script: Improve error message #1926
Comments
Quick update I used this CSV from docs But still it shows same error: |
@michaelbromley I have found the bug after hours of debugging, The importer was not able to createProductVariant because there were no taxCategories. Reason being:
That empty taxRates Array was the problem all ALONG, it now works as expected |
Thanks for the update. Do you happen to have a stack trace to go with this error?
If so, I'd like to add a check here and give a more helpful error message to prevent others from getting stuck too. |
@michaelbromley I dont think there was any stack trace it was just info 12/6/22, 9:49 PM - [Populate] Populated initial data |
OK thanks. I'm going to re-open this because I think we need to provide a better error message which exactly states why the error is occurring. |
Describe the bug
While importing the products, it imports 0 products and logs this error in vendure-import-error.log
Cannot read properties of undefined (reading 'id')
A thing I observed is it uploads facets from the first row of CSV and then it throws error
To Reproduce
Steps to reproduce the behavior:
Delete the DB
my-migration-4.zip
Create vendure.sqlite file
Run the migration script which prepares a blank vendure database
Run the populate scripts and upload the csv
Expected behavior
info 12/8/22, 8:35 PM - [Populate] Populated initial data
info 12/8/22, 8:35 PM - [Populate] Imported 50 products
info 12/8/22, 8:35 PM - [Populate] Done!
Environment (please complete the following information):
Additional context
Before deleting the database, I tried uploading products to an existing database which consisted of products and it successfully imported all the products
an example set of my csv:
initial-data.ts
The text was updated successfully, but these errors were encountered: