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

TypeError: Invalid attempt to spread non-iterable instance. #167

Open
SvyatoslavPozhydaev opened this issue Jan 18, 2024 · 1 comment
Open

Comments

@SvyatoslavPozhydaev
Copy link

SvyatoslavPozhydaev commented Jan 18, 2024

data ? console.error(msg, data, ...opts) : console.error(msg, ...opts);

TypeError: Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.
    at _nonIterableSpread (nonIterableSpread.js:8:9)
    at _toConsumableArray (toConsumableArray.js:14:304)
    at YupSchemaEntry.error (entry.js:171:423)
    at YupSchemaEntry.toEntry (entry.js:179:14)
    at Object.createYupSchemaEntry (create-entry.js:10:71)
    at YupBuilder.createYupSchemaEntry (yup-builder.js:282:26)
    at YupBuilder.propToYupSchemaEntry (yup-builder.js:276:19)
    at YupBuilder.reducePropToShape (yup-builder.js:251:33)
    at eval (yup-builder.js:245:16)
    at Array.reduce (<anonymous>)

opts is object

object cant spread to array

@rasmusrim
Copy link

Same problem here. This was due to a $ref in my schema definition. This library does not support $ref

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

No branches or pull requests

2 participants