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>)
https://github.com/kristianmandrup/schema-to-yup/blob/67e33470f210e53d3fe755a3227429b8c3f4b04f/src/entry.js#L110
opts is object
object cant spread to array