Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby): Handle missing match-paths.json in serve #16246

Merged
merged 2 commits into from
Aug 1, 2019

Conversation

m-allanson
Copy link
Contributor

@m-allanson m-allanson commented Jul 31, 2019

Description

gatsby serve uses the match-paths.json file from Gatsby's .cache directory to configure client side routing. It assumes that file always exists. If that file doesn't exist, the error bubbles up to the cli's generic fail handling code.

This results in a confusing error as seen in #16092.

This PR adds a warning if match-paths.json doesn't exist:

Screenshot of updated warning message

Related Issues

Fixes #16092

Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@sidharthachatterjee sidharthachatterjee added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Aug 1, 2019
@sidharthachatterjee sidharthachatterjee changed the title fix(gatsby): Handle missing file in serve command Aug 1, 2019
@gatsbybot gatsbybot merged commit d54de72 into master Aug 1, 2019
@sidharthachatterjee sidharthachatterjee deleted the serve-check-file branch August 1, 2019 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
4 participants