0

Hi I'm building a website with Gatsby version 4.2.0 and deploy with Netlify. However, I kept getting errors like this regarding cache content in the Netlify log.

ENOENT: no such file or directory, open '/opt/build/repo/.cache/caches/gatsby-source-contentful/33fda62asdfsdfkjwbdjkljsdf1/HeroBackground.jpeg.jpg

I've tried gatsby clean and gatsby build and "clear cache and deploy site" a few times in Netlify. Nothing seems to work.

I can't figure out why everything works locally but when Netlify builds the site, it seems to append ".jpg" to my image.

Any guidance will be appreciated! Thank you !

Package.json

 "   gatsby": "^4.2.0",
    "gatsby-plugin-image": "^2.2.0",
    "gatsby-plugin-netlify": "3.14.0",
    "gatsby-source-contentful": "^6.0.0",
    "gatsby-transformer-remark": "5.0.0",
    "gatsby-transformer-sharp": "^4.0.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
  

1 Answers1

0

According to some GitHub threads try:

  • Upgrading gatsby-source-contentful to the latest version
  • Try refreshing the Contentful cache by changing the file name
Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67