mitya33 / cfimp

A simple but powerful spreadsheet-derived (CSV, TSV) data importer for the Contentful headless CMS. In so doing, it can also link items to references, assets or tags, and even publish items. It can also be used to update existing items rather than import new ones.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cfimp read only first line in csv

gitomatikus opened this issue · comments

csv file:

text1,1050,2100,ref-123
text2,1060,2200,ref-124
text3,1070,2400,ref-124

Line command: npx cfimp -space:space -model:modelname -locale:en-US -delim:com -fields:name,amount,oldAmount,locale -preview
return:
image

And if I will try to run it without preview, only first line will be upliaded

From my testing, this seems to be related to the inconsistent way CLI args are passed to Node in different contexts.

One breaking change I've made in response is that any arguments that are passed a list, e.g. fields, must now be quoted, e.g. ... -fields:"one,two,three".

Could you please try the following possible solutions, until one works (noting the instruction above, too, re: quotes):

  1. Try again via NPX, but specifying the latest version, i.e. cfimp@1.0.34
  2. Try installing it, via npm i -g cfimp@1.0.34 (or if you don't want to do it locally, then as a dev dependency, i.e. npm i -D cfimp@1.0.34 and then run it locally i.e. same command as you used before but without npx at the start
  3. Pull down the JS file then run it via Node directly, from its directory, i.e. node cfimp <your args>