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

Using sort and filter in allMarkdownRemark breaks develop mode #16446

Closed
crutchcorn opened this issue Aug 7, 2019 · 10 comments
Closed

Using sort and filter in allMarkdownRemark breaks develop mode #16446

crutchcorn opened this issue Aug 7, 2019 · 10 comments

Comments

@crutchcorn
Copy link

Description

Describe the issue that you're seeing.

When using allMarkdownRemark with both sort and filter breaks develop mode (when opening the localhost:8000 port, it will flash the screen between background color and white, then crash the CLI).

Steps to reproduce

Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue much easier to diagnose (seriously).

This commit shows the changes made:
unicorn-utterances/unicorn-utterances@a046f1e

You can see that using npm run develop and opening the localhost instance will show the error but running npm run build and opening the public folder built code will run just fine

Environment

Run gatsby info --clipboard in your project directory and paste the output here.

Environment Info
  System:
    OS: macOS High Sierra 10.13.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 8.16.0 - ~/.nvm/versions/node/v8.16.0/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.10.1 - ~/.nvm/versions/node/v8.16.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/local/bin/python
  Browsers:
    Chrome: 75.0.3770.142
    Safari: 12.1.2
  npmPackages:
    gatsby: ^2.13.52 => 2.13.52
    gatsby-image: ^2.2.8 => 2.2.8
    gatsby-plugin-feed: ^2.3.6 => 2.3.6
    gatsby-plugin-google-analytics: ^2.1.7 => 2.1.7
    gatsby-plugin-lunr: ^1.5.2 => 1.5.2
    gatsby-plugin-manifest: ^2.2.5 => 2.2.5
    gatsby-plugin-offline: ^2.2.4 => 2.2.4
    gatsby-plugin-prefetch-google-fonts: ^1.4.3 => 1.4.3
    gatsby-plugin-react-helmet: ^3.1.3 => 3.1.3
    gatsby-plugin-react-svg: ^2.1.2 => 2.1.2
    gatsby-plugin-sass: ^2.1.4 => 2.1.4
    gatsby-plugin-sharp: ^2.2.10 => 2.2.10
    gatsby-plugin-sitemap: ^2.2.5 => 2.2.5
    gatsby-plugin-transition-link: ^1.12.4 => 1.12.4
    gatsby-remark-autolink-headers: ^2.1.3 => 2.1.3
    gatsby-remark-copy-linked-files: ^2.1.4 => 2.1.4
    gatsby-remark-images: ^3.1.7 => 3.1.7
    gatsby-remark-prismjs: ^3.3.4 => 3.3.4
    gatsby-remark-responsive-iframe: ^2.2.4 => 2.2.4
    gatsby-source-filesystem: ^2.1.9 => 2.1.9
    gatsby-transformer-json: ^2.2.2 => 2.2.2
    gatsby-transformer-remark: ^2.6.11 => 2.6.11
    gatsby-transformer-sharp: ^2.2.5 => 2.2.5
crutchcorn referenced this issue in unicorn-utterances/unicorn-utterances Aug 7, 2019
This was merged into it's own branch as there is a bug in Gatsby that breaks develop mode with this applied. Waiting until upstream fix before merging into master
@stefanprobst
Copy link
Contributor

What's the error message you get?

I see Error: Cannot find module './config/gatsby-config-consts' which seems unrelated?

@crutchcorn
Copy link
Author

Pushed a commit that fixes that problem to the same branch, sorry @stefanprobst . Thought I added that file after gitignoring

@crutchcorn
Copy link
Author

After the page refreshes a bunch, I get the error upon the CLI failing:

ℹ 「wdm」: Compiled successfully.


——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
7 pages                                                                                                                                                                            unicorn-utterances-site
/Users/ccrutchley/git/UnicornUtter/blog-dev/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

TypeError: Cannot read property 'write' of null
    at Zlib.callback (zlib.js:499:33)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! unicorn-utterances-site@0.1.0 develop: `gatsby develop`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the unicorn-utterances-site@0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ccrutchley/.npm/_logs/2019-08-07T20_53_51_285Z-debug.log

@stefanprobst
Copy link
Contributor

Hmm I cannot reproduce this. Running develop in the fix-author-post-sort branch in your repo seems to work ok.

@crutchcorn
Copy link
Author

That's so strange. Could it have something to do with the systems we're using somehow?

Just to confirm, this is AFTER opening the localhost:8080 link?

I rm -rf node_modules and npm id again to double check and it seems to still be happening

I just realized, interestingly, that it only happens if I install it on my install on Chrome, but not Firefox or Safari

Google Chrome | 75.0.3770.142 (Official Build) (64-bit)

@stefanprobst
Copy link
Contributor

Just to confirm, this is AFTER opening the localhost:8080 localhost:8000 link?

yes.

I'm, on Linux, Node 10.16.2, Firefox 68/Chromium 76.

@crutchcorn
Copy link
Author

After looking into a bunch of stuff it seems that going into the site settings and clearing cache has fix the issue. Strange.

@slorber
Copy link
Contributor

slorber commented Sep 5, 2019

@crutchcorn also get a similar error here: #16141 (comment)

what's your gatsby version?

what do you mean by going into the site settings?

@crutchcorn
Copy link
Author

@slorber I mean within the application tab on Chrome (it will likely change depending on your browser, this is the only one I was having issues on):

image showing the application tab in the chrome debugger

Then pressing "Clear site data"

@slorber
Copy link
Contributor

slorber commented Sep 18, 2019

Thanks I see

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

No branches or pull requests

3 participants