Skip to content
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

Does not work with sample data #1

Open
shendriksza opened this issue Mar 15, 2019 · 3 comments
Open

Does not work with sample data #1

shendriksza opened this issue Mar 15, 2019 · 3 comments

Comments

@shendriksza
Copy link

Running the script with the sample data (apparel.csv) as provided on developers.moltin.com/guides/uploading-csv-data fails.

Command -
node app.js "/path/to/apparel.csv"

Output -
Read 17 objects from /path/to/apparel.csv file
TypeError: Cannot read property 'id' of undefined
at module.exports (/path/to/data/moltinobjects.js:25:31)
at processTicksAndRejections (internal/process/next_tick.js:81:5)

@gje4
Copy link
Contributor

gje4 commented Mar 18, 2019

Hey Shendriksza,

I just tested. I ran into the error you are seeing when there is no .env file used. Once that is set everything worked as expected. You can either set up an .env file and add your keys or manually set your keys. Note not all places where keys need to be added are on here. I will update.
https://developers.moltin.com/guides/uploading-csv-data#add-your-site-credentials

Example env
.env top level of the project.
NEW_SITE_CLIENT_ID=XXXXXX
NEW_SITE_SECRET=XXXXXX

@gje4
Copy link
Contributor

gje4 commented Mar 18, 2019

Just updated the guide to call that out better, let me know if you have any issues.

https://developers.moltin.com/guides/uploading-csv-data#add-your-site-credentials

@shendriksza
Copy link
Author

Hi gje4, thanks for the tip. I think I managed to get the keys setup but I'm still facing an issue.

The custom fields are added successfully and I can see them appear on the Moltin dashboard under Flows (vendor, Tags and collections) yet everything else fails with the following error appearing multiple times:

TypeError: Cannot read property 'name' of undefined

and the catalog remains empty on my Motlin dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants