I have a gatsby site which is using Netlify CMS along with large media
If I run npm run build locally, the site builds without issue, and I can then run gatsby server to view the site, again without issue.
When I deploy to Netlify, the build is also running npm run build, but it fails at the same point every time:
8:16:06 PM: error There was an error in your GraphQL query:
8:16:06 PM: unrecognized file format
8:16:06 PM: 5 | seo_description
8:16:06 PM: 6 | seo_title
8:16:06 PM: 7 | title
8:16:06 PM: 8 | gallerysections {
8:16:06 PM: 9 | landscape_image_video_gallerysections_vimeo_video_id
8:16:06 PM: 10 | landscape_image_video_gallerysections_video {
8:16:06 PM: 11 | publicURL
8:16:06 PM: 12 | }
8:16:06 PM: 13 | landscape_image_video_gallerysections_image {
8:16:06 PM: 14 | childImageSharp {
8:16:06 PM: > 15 | gatsbyImageData(placeholder: NONE)
8:16:06 PM: | ^
8:16:06 PM: 16 | }
8:16:06 PM: 17 | publicURL
8:16:06 PM: 18 | }
8:16:06 PM: 19 | type
8:16:06 PM: 20 | }
8:16:06 PM: 21 | }
8:16:06 PM: 22 | }
8:16:06 PM: 23 | }
8:16:06 PM: 24 |
8:16:06 PM: File path: /opt/build/repo/src/templates/gallery.js
8:16:06 PM: Url path: /gallery/2022/6/25/look-deeper/
8:16:06 PM: Plugin: none
8:16:06 PM:
8:16:06 PM:
8:16:06 PM: ProbeError: unrecognized file format
Im including the package-lock file in the repo, and my package.json file looks like:
"@babel/eslint-parser": "7.18.2",
"@gatsbyjs/reach-router": "1.3.7",
"@mailchimp/mailchimp_marketing": "3.0.75",
"@vimeo/player": "2.17.0",
"babel-preset-gatsby": "2.17.0",
"dotenv": "16.0.1",
"gatsby": "4.17.1",
"gatsby-link": "4.17.0",
"gatsby-plugin-image": "2.17.0",
"gatsby-plugin-manifest": "4.17.0",
"gatsby-plugin-netlify": "5.0.0",
"gatsby-plugin-netlify-cms": "6.17.0",
"gatsby-plugin-offline": "5.17.0",
"gatsby-plugin-react-helmet": "5.17.0",
"gatsby-plugin-react-svg": "3.1.0",
"gatsby-plugin-robots-txt": "1.7.1",
"gatsby-plugin-sass": "5.17.0",
"gatsby-plugin-sharp": "4.17.0",
"gatsby-remark-copy-linked-files": "5.17.0",
"gatsby-remark-images": "6.17.0",
"gatsby-remark-relative-images": "0.3.0",
"gatsby-source-filesystem": "4.17.0",
"gatsby-transformer-remark": "5.17.0",
"gatsby-transformer-sharp": "4.17.0",
"lodash": "4.17.21",
"lodash-webpack-plugin": "0.11.6",
"mailchimp-api-v3": "1.15.0",
"netlify-cms-app": "2.15.72",
"netlify-cms-media-library-uploadcare": "0.5.10",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-helmet": "6.1.0",
"react-lazy-load-image-component": "1.5.4",
"sass": "1.53.0"
The image its failing on is just a JPG, so it should work with Gatsby image, but Ive also tried several other images of type JPG and PNG, to which I get the same error.
Any idea why this would be failing within Netlify but not when I run build locally?