Summary
Local gatsby develop / HMR stops serving a working app. The browser console reports:
[HMR] connected
[HMR] bundle has 26 errors
followed by many Webpack Module build failed: Error: ENOENT: no such file or directory, open '…/node_modules/…' errors, including:
@hot-loader/react-dom/node_modules/scheduler/…
axios/lib/defaults.js
gatsby-link/index.js
gatsby-react-router-scroll/index.js
- many
gatsby/node_modules/@babel/runtime/helpers/** files
Likely cause
Corrupted or incomplete node_modules (often while gatsby develop is still running), plus npm hoisting that left gatsby-link / gatsby-react-router-scroll only nested under gatsby (develop SSR cannot resolve them from .cache).
Acceptance criteria
Resolution
Shipped in #452.
Summary
Local
gatsby develop/ HMR stops serving a working app. The browser console reports:followed by many Webpack
Module build failed: Error: ENOENT: no such file or directory, open '…/node_modules/…'errors, including:@hot-loader/react-dom/node_modules/scheduler/…axios/lib/defaults.jsgatsby-link/index.jsgatsby-react-router-scroll/index.jsgatsby/node_modules/@babel/runtime/helpers/**filesLikely cause
Corrupted or incomplete
node_modules(often whilegatsby developis still running), plus npm hoisting that leftgatsby-link/gatsby-react-router-scrollonly nested undergatsby(develop SSR cannot resolve them from.cache).Acceptance criteria
TROUBLESHOOTING.mdnpm run developon Node 18 serves without the 26 HMR ENOENT errorshttp://localhost:8001(verified HTTP 200)gatsby-link/gatsby-react-router-scroll; overrideremark-mdx@1.6.22; ensure google-fonts dirs pluginResolution
Shipped in #452.