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

Invalid Record Length error when building app generated with template-default #510

Closed
chrispcampbell opened this issue Aug 19, 2024 · 0 comments · Fixed by #511 or #512
Closed

Invalid Record Length error when building app generated with template-default #510

chrispcampbell opened this issue Aug 19, 2024 · 0 comments · Fixed by #511 or #512
Assignees
Labels

Comments

@chrispcampbell
Copy link
Contributor

In #503 I added 3 columns to the config/model.csv file used by plugin-config, but I forgot that there is code in the create package that updates this file at project creation time. Building an app generated using the create package produces this error message:

> [email protected] dev
> sde dev

CsvError: Invalid Record Length: columns length is 6, got 3 on line 2
    at Object.__onRecord (file:///tmp/test7/node_modules/csv-parse/lib/api/index.js:372:11)
    at Object.parse (file:///tmp/test7/node_modules/csv-parse/lib/api/index.js:247:40)
    at parse (file:///tmp/test7/node_modules/csv-parse/lib/sync.js:20:23)
    at readCsvFile (file:///tmp/test7/node_modules/@sdeverywhere/plugin-config/dist/index.js:327:10)
    at readConfigCsvFile (file:///tmp/test7/node_modules/@sdeverywhere/plugin-config/dist/index.js:335:10)
    at createConfigContext (file:///tmp/test7/node_modules/@sdeverywhere/plugin-config/dist/index.js:293:20)
    at processModelConfig (file:///tmp/test7/node_modules/@sdeverywhere/plugin-config/dist/index.js:851:19)
    at Object.modelSpec (file:///tmp/test7/node_modules/@sdeverywhere/plugin-config/dist/index.js:819:12)
    at buildOnce (file:///tmp/test7/node_modules/@sdeverywhere/build/dist/index.js:683:44)
    at build (file:///tmp/test7/node_modules/@sdeverywhere/build/dist/index.js:903:33) {
  code: 'CSV_RECORD_INCONSISTENT_COLUMNS',
  bytes: 118,
  comment_lines: 0,
  empty_lines: 0,
  invalid_field_length: 0,
  lines: 2,
  records: 0,
  columns: [
    { name: 'graph default min time' },
    { name: 'graph default max time' },
    { name: 'model dat files' },
    { name: 'bundle listing' },
    { name: 'custom lookups' },
    { name: 'custom outputs' }
  ],

I need to change the create package to add default values for those 3 columns.

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