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

Old fixed errors from nested files reappear #15722

Closed
karlhorky opened this issue Jul 15, 2019 · 2 comments
Closed

Old fixed errors from nested files reappear #15722

karlhorky opened this issue Jul 15, 2019 · 2 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@karlhorky
Copy link
Contributor

karlhorky commented Jul 15, 2019

Description

When errors occur within files within directories, the errors are reported on the command line and in the browser (this is good!). However, when the error has been resolved by removing the offending files, the errors do not go away.

Steps to reproduce

  1. Start a new site using gatsby new
  2. Start the development server and navigate to a working page such as the root in the browser
  3. Add a folder under pages with a JavaScript with an error in it (for instance, import blah from 'blah' - an import of a non-existent package)
  4. The error appears in the browser and the command line
  5. Remove the folder again
  6. Refresh the page in the browser a bunch of times - the error appears intermittently until gatsby develop has been restarted

Video

Kapture 2019-07-15 at 12 09 49

Expected result

At step 6. you should never see the old invalid error anymore.

Actual result

You do see the error.

Motivation

To prevent confusion about false negative error reporting.

Related

Maybe related to #14395 or #11456

Environment

System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
Shell: 5.5.1 - /usr/local/bin/zsh
Binaries:
Node: 12.1.0 - /var/folders/v0/ssn2yzps0wq9j6ngd3128_440000gn/T/yarn--1563185093192-0.21022637200966066/node
Yarn: 1.16.0 - /var/folders/v0/ssn2yzps0wq9j6ngd3128_440000gn/T/yarn--1563185093192-0.21022637200966066/yarn
npm: 6.9.0 - /usr/local/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 75.0.3770.100
Firefox: 67.0.2
Safari: 12.1.1
npmPackages:
gatsby: ^2.13.21 => 2.13.21
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.7 => 2.2.7
gatsby-source-filesystem: ^2.1.5 => 2.1.5
gatsby-transformer-sharp: ^2.2.3 => 2.2.3

@karlhorky karlhorky changed the title Recover from solved errors in nested files without restarting develop Old errors in nested files reappear after resolution Jul 15, 2019
@karlhorky karlhorky changed the title Old errors in nested files reappear after resolution Old errors from nested files reappear after resolution Jul 15, 2019
@sidharthachatterjee sidharthachatterjee added the type: bug An issue or pull request relating to a bug in Gatsby label Jul 15, 2019
@sidharthachatterjee
Copy link
Contributor

Thank you for reporting this @karlhorky and for the detailed steps to reproduce!

I'm going to take a look at this tomorrow and respond here again with further details

@sidharthachatterjee sidharthachatterjee self-assigned this Jul 15, 2019
@karlhorky karlhorky changed the title Old errors from nested files reappear after resolution Old fixed errors from nested files reappear Jul 16, 2019
@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 6, 2019
@karlhorky karlhorky added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Aug 7, 2019
@sidharthachatterjee sidharthachatterjee removed their assignment Sep 10, 2019
@gatsbyjs gatsbyjs deleted a comment from gatsbot bot Sep 10, 2019
@LekoArts
Copy link
Contributor

LekoArts commented Jul 3, 2020

I've tested this locally (new hello-world, create a page-2.js file, put something valid in it, bad import, delete page-2.js file) and the page reloads and the error in the browser isn't shown. As such I'll close this as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants