gatsby-source-openapi-aggregate icon indicating copy to clipboard operation
gatsby-source-openapi-aggregate copied to clipboard

TypeError Cannot convert undefined or null to object

Open ghost opened this issue 7 years ago • 2 comments

I tried copying all the settings in the sample you provided, but whenever I tried to run build, I experience this error :

image

Any Ideas? Thanks!

ghost avatar Dec 20 '18 18:12 ghost

Hi, what does your config look like and file system? The error suggests the spec file is in a different path, or does not have a definitions property.

devdigital avatar Dec 22 '18 18:12 devdigital

Hi @devdigital, I was able to determine the cause for the error now. The path was pointing to the correct file and all. The problem was, there was a declared definition that was not used in my json file, but it took quite a while to get to determine what caused it. I tried to validate said JSON file, the finding was that there was a warning for the said line.

I guess it would be helpful in the future if it would be able to displayed in the logs what caused the error and to also mention that json file warnings would also be flagged as errors

lexicalparadoxx avatar Dec 23 '18 10:12 lexicalparadoxx