fix(deps): restore develop after corrupted node_modules / HMR ENOENT#452
Merged
Conversation
Hoist gatsby-link and gatsby-react-router-scroll as direct deps so the develop SSR bundle can resolve them, override remark-mdx to 1.6.22 to avoid ERR_REQUIRE_ESM in gatsby-recipes, add a first-party plugin that creates google-fonts cache dirs before prefetch-google-fonts, and document the recovery path in TROUBLESHOOTING.md. Closes #451 Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gatsby developwhen HMR reports dozens ofENOENT/Can't resolveerrors fornode_modules(and nested packages that stopped being hoisted).gatsby-link@2.11.0andgatsby-react-router-scroll@3.7.0, npm overrideremark-mdx@1.6.22, and local pluginplugins/ensure-google-fonts-dirs(with tests).TROUBLESHOOTING.md.Closes #451
Test plan
npm test— 29 suites greennpm run developon Node 18 serveshttp://localhost:8001with HTTP 200Made with Cursor