Gatsby: `gatsby develop` console output missing when warnings are present

Created on 29 May 2018  Â·  7Comments  Â·  Source: gatsbyjs/gatsby

Description

As per https://github.com/gatsbyjs/gatsby/issues/5485#issuecomment-390571773 - if something triggers a warning in the console during the initial build process of gatsby develop, subsequent messages in the console appear to get lost. Specifically, the useful links to the development site and GraphiQL editor.

Steps to reproduce

Install gatsby-plugin-netlify-cms
Run gatsby develop

Expected result

Output in console should warn about the "pre-built javascript file" as normal, but after that, show the localhost:8000 and localhost:8000/___graphql links.

Actual result

success write out redirect data — 0.001 s
success onPostBootstrap — 0.001 s

info bootstrap finished - 5.813 s

 WARNING  Compiled with 1 warnings                                                                                                                                                              16:30:27

 warning  in ./~/netlify-cms/dist/cms.js

Critical dependencies:
42:378-385 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.

 @ ./~/netlify-cms/dist/cms.js 42:378-385

 WAIT  Compiling...                                                                                                                                                                             16:30:27

 WARNING  Compiled with 1 warnings                                                                                                                                                              16:30:28

 warning  in ./~/netlify-cms/dist/cms.js

Critical dependencies:
42:378-385 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.

 @ ./~/netlify-cms/dist/cms.js 42:378-385

Environment

  • Gatsby version (npm list gatsby): 1.9.261
  • gatsby-cli version (gatsby --version): 1.1.52
  • Node.js version: 9.4.0
  • Operating System: macOS High Sierra
good first issue bug

Most helpful comment

Yeah it's on the list, just been consumed with other things (and killed my Gatsby repo trying to fix other things yesterday!). I'll have it ready in the next day or so.

All 7 comments

I think here's the reason for it - https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/commands/develop.js#L402 - would you be up for creating PR to fix this?

Yeah, I can do. What's the recommendation? Just remove the check for warnings?

Yeah, that would be my recommendation, but I'm not sure what was the reason for putting this check there.

@KyleAMathews do You remember why You disabled printing You can now view ${chalk.bold(appName)} in the browser if there are "just" warnings in https://github.com/gatsbyjs/gatsby/pull/2951/files#diff-346c3005d97c1ca0b5efb170af1b43f6R342 ?

Not really 😅

Yeah, warnings don't mean the build wasn't "successful" so we should only check for errors.

hey @martynhoyer, can you make a PR, please (unless you have no time and want somebody else to do it)?

Yeah it's on the list, just been consumed with other things (and killed my Gatsby repo trying to fix other things yesterday!). I'll have it ready in the next day or so.

@martynhoyer thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

signalwerk picture signalwerk  Â·  3Comments

theduke picture theduke  Â·  3Comments

3CordGuy picture 3CordGuy  Â·  3Comments

KyleAMathews picture KyleAMathews  Â·  3Comments

kalinchernev picture kalinchernev  Â·  3Comments