Closed Tom-Bonnike closed 7 years ago
Oh, I found the culprit. A setTimeout in GSAP’s TweenLite. I’ll see what I can do on their side :)
If someone ever has the same problem, here’s how I debugged it:
I removed every page, one by one, until I was only left with my _template.js only rendering a <div>
and my JSON wrapper. I was actually rendering a component in this wrapper.
I made it so that the component would only render a <div>
and then commented out every dependency one by one until I found out it was TweenLite.
As suggested on the twitter thread that I linked, I used https://github.com/mafintosh/why-is-node-running to see what was making node hang in TweenLite :)
I can still open a PR to add that sweet process.exit()
if you’d like!
I tried cloning gatsby-starter-default and it works properly, so IDK what could be wrong with my project. This is obviously annoying for tasks such as:
gatsby build --prefix-links && gh-pages -d public
I simply fixed it by addingprocess.exit()
incli.js
when the command is done, but it’s still strange! Here’s the code if you want to take a look: https://github.com/Tom-Bonnike/portfolio-amineEDIT: this twitter thread is interesting, I’ll investigate on my own project when I’ll have the time :) https://twitter.com/kentcdodds/status/863070381648859136