-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Implement step one of refactoring how we handle internal errors #2951
Conversation
Borrowed a bunch of code from create-react-app. Eventual goal is that we centrally manage all errors so we can print them more tidily in the terminal but also send them to the browser + other places in the future.
Deploy preview ready! Built with commit 0818b9f |
@@ -70,8 +70,7 @@ async function parseToAst(filePath, fileStr) { | |||
`There was a problem parsing "${filePath}"; any GraphQL ` + | |||
`fragments or queries in this file were not processed. \n` + | |||
`This may indicate a syntax error in the code, or it may be a file type ` + | |||
`That Gatsby does not know how to parse.`, | |||
error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jquense this wasn't supposed to be there right? The stack trace was just a long bunch of babel parsing nonsense.
}/___graphql`, | ||
], | ||
}, | ||
// compilationSuccessInfo: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're handling this directly now
Deploy preview ready! Built with commit 0818b9f |
// // Only keep the first error. Others are often indicative | ||
// // of the same problem, but confuse the reader with noise. | ||
// if (messages.errors.length > 1) { | ||
// messages.errors.length = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll restore this replacing FriendlyErrorsWebpackPlugin
once the remainder of the error/warning refactoring is done.
@@ -13,13 +15,15 @@ const handlerP = fn => (...args) => { | |||
} | |||
|
|||
function buildLocalCommands(cli, isLocalSite) { | |||
const defaultHost = `localhost` | |||
const defaultHost = `0.0.0.0` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out Windows doesn't need us to listen on localhost, just that I guess the browser can't use 0.0.0.0 or something like that.
This also adds local network ip (common feature request (thanks CRA)) |
Borrowed a bunch of code from create-react-app.
Eventual goal is that we centrally manage all errors so we can print
them more tidily in the terminal but also send them to the browser +
other places in the future.