umd-mith / airwaves

Unlocking the Airwaves
https://mith.umd.edu/airwaves/
MIT License
9 stars 2 forks source link

Exhibit pages not building #13

Closed trevormunoz closed 3 years ago

trevormunoz commented 3 years ago

I noticed this issue on #12 but I don't think it's actually related to the image stuff. I think this might be something that cropped up since the migration to Gatsby 3 but wasn't detected before now?

I am guessing the problem is in gatsby-node.js? When I try to click through to an exhibit I get a runtime error from gatsby: path.startsWith is not a function

I remember path as being one of those functions that isn't shimmed any more but I thought we resolved that issue.

trevormunoz commented 3 years ago

The error log in the netlify build is much more informative than what I was getting locally: https://app.netlify.com/sites/unlocking/deploys/60918367665e880008405123

edsu commented 3 years ago

Is this assigned to me, or are you doing it @trevormunoz ?

trevormunoz commented 3 years ago

I realize this got kind of tangled because I found the error on my responsive-images branch but could you take this one @edsu ?

edsu commented 3 years ago

It looks like this is the result of the GraphQL for generating exhibits having changed to use the new gatsby-plugin-image? The Visual component previously wanted to be given image that was a string (the path portion of the URL), but now it's getting an object that is the result of the GraphQL.

I know it has been written about but I just haven't had the time to get up to speed with what is being done to change image handling with gatsby-plugin-image. Was the plan to update the Visual component to use the new GraphQL that is being queried?

For the moment I can adjust the GraphQL query to still get the publicURL and update src/templates/exhibit.js appropriately.

edsu commented 3 years ago

I've updated the image-plugin branch to use the image path until the exhibit template can be updated to use the data being returned by gatsby-plugin-image. So the build works again.

trevormunoz commented 3 years ago

Thanks. I had missed the Visual component. Yes, the plan is to update it to consume the new GraphQL