gatsby serve - Hint: "Did you mean this? serve" - confused馃ゴ

Created on 25 Jul 2019  路  6Comments  路  Source: gatsbyjs/gatsby

Summary

I am cloning the repo, running npm install and copying the public folder from a previous pipeline step.

If run gatsby serve, it returns an exit code 1.

If I run gatsby build again, it works.

Relevant information

I am running gatsby serve in my CI/CD pipeline. The "error" that is coming back is very confusing.

Screenshot 2019-07-25 at 22 13 40

Any ideas what the problem is?

Environment (if relevant)

gatsby info --clipboard

System:
OS: Linux 4.19 Debian GNU/Linux 9 (stretch) 9 (stretch)
CPU: (1) x64 Intel(R) Xeon(R) CPU @ 2.30GHz
Shell: 4.4.12 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Languages:
Python: 2.7.13 - /usr/bin/python
npmPackages:
gatsby: ^2.13.31 => 2.13.31
gatsby-image: ^2.2.6 => 2.2.6
gatsby-plugin-manifest: ^2.2.3 => 2.2.3
gatsby-plugin-offline: ^2.2.4 => 2.2.4
gatsby-plugin-react-helmet: ^3.1.2 => 3.1.2
gatsby-plugin-sharp: ^2.2.8 => 2.2.8
gatsby-source-filesystem: ^2.1.5 => 2.1.5
gatsby-transformer-sharp: ^2.2.4 => 2.2.4
npmGlobalPackages:
gatsby-cli: 2.7.20

needs reproduction

Most helpful comment

I just stopped by to say that 馃ゴ is a great emoji and we can imagine your sentiment 馃槀

All 6 comments

This looks very strange. It seems like the gatsby serve --verbose command is being run multiple times for some reason.

Are you able to replicate this error when running locally? And are you able to share the project that causes this error?

issue-16092.zip

Thank you for your reply @m-allanson . I have managed to replicate this locally as well.

It seems that gatsby serve gets confused if the .cache folder is missing.

Thanks for the investigation @vdespa! I've opened a PR #16246 that should fix this.

As a workaround you can copy .cache/match-paths.json from the previous pipeline step, and the serve command should run as expected.

I just stopped by to say that 馃ゴ is a great emoji and we can imagine your sentiment 馃槀

Great, thanks for the quick fix @m-allanson

This still happens....

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Oppenheimer1 picture Oppenheimer1  路  3Comments

signalwerk picture signalwerk  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

theduke picture theduke  路  3Comments

timbrandin picture timbrandin  路  3Comments