Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching issues in Gatsby v2 project

I am getting errors running 'gatsby develop' on a Gatsby v2 site after deleting a few old pages.

error UNHANDLED EXCEPTION Error: ENOENT: no such file or directory, open 'D:\dev\my-gatsby-blog\public\static\d\573\path--- my-blog-post-d-5-f-ef1-Y9bdv2wHaTrcrlb7d2XeeQc6MYw.json'

  • websocket-manager.js:21 readCachedResults [my-blog]/[gatsby]/dist/utils/websocket-manager.js:21:24
  • websocket-manager.js:44 getCachedPageData [tutorial-part-four]/[gatsby]/dist/utils/websocket-manager.js:44:13
  • websocket-manager.js:140 Socket.s.on.path [tutorial-part-four]/[gatsby]/dist/utils/websocket-manager.js:140:26
  • socket.js:528 [tutorial-part-four]/[socket.io]/lib/socket.js:528:12
  • next_tick.js:131 _combinedTickCallback internal/process/next_tick.js:131:7
  • next_tick.js:180 process._tickCallback internal/process/next_tick.js:180:9

My particular site is a blog that shows a list of posts on the index. Not sure if its relevant but the deleted pages are Markdown files resolved with the plugin gatsby-transformer-remark.

like image 609
Justin Fiedler Avatar asked Nov 22 '25 13:11

Justin Fiedler


1 Answers

I was able to resolve this by deleting the contents of the .cache directory. Using rimraf I added a new script to my package.json to simplify the process in the future.

"cleancache": "rimraf .cache/*"
like image 150
Justin Fiedler Avatar answered Nov 24 '25 02:11

Justin Fiedler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!