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

chore: check finalWatchFileSystem.watcher nullability #172

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

86
Copy link
Contributor

@86 86 commented Nov 22, 2023

In this PR, I have added a check for the nullability of finalWatchFileSystem.watcher

Background

This library is used by the development server that starts up during Gatsby development.

Gatsby features a function named DEV_SSR, which makes it easier to detect SSR errors during development. However, when this feature is enabled in our environment and an actual SSR error occurs, the development server itself shuts down due to the following error in this library:

Cannot read properties of null (reading 'fileWatchers')

This prevents us from verifying the content of the SSR error, defeating the purpose of the DEV_SSR feature. While I have not fully investigated why finalWatchFileSystem.watcher becomes null, I believe that the modification proposed in this PR will not have any adverse effects. I would appreciate it if you could consider merging this change.

@larixer larixer merged commit e33dca4 into sysgears:master Nov 22, 2023
3 checks passed
@larixer
Copy link
Member

larixer commented Nov 22, 2023

No problem, lets merge it. Published in version 0.6.1

@86 86 deleted the 86/avoid-filewatcher-null branch November 23, 2023 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants