paleite/typeface-jetbrains-mono

Cached Gatsby Builds Failing

Closed this issue · 3 comments

ystxn commented

For some strange reason, cached Gatsby builds will fail when processing this module. I suspect that it might be due to the assets being stored in a sub ./node_modules/ directory, which somehow gets wiped when Gatsby persists the cache. A quick look at the structure of other typeface-* projects shows they typically store the assets in another sub-directory like app.

I experience this at develop-time using gatsby develop as well as deployment on zeit.co/now.sh where it's more obvious as every alternate build fails then the next one passes because they wipe the entire cache after a build failure.

17:17:06.184 failed Building production JavaScript and CSS bundles - 6.987s
17:17:06.189 ERROR #98123  WEBPACK
17:17:06.189 Generating JavaScript bundles failed
17:17:06.189 Module not found: Error: Can't resolve './node_modules/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff' in '/zeit/16595f24/node_modules/typeface-jetbrains-mono'
17:17:06.189 File: node_modules/typeface-jetbrains-mono/index.css
17:17:06.191 not finished run queries - 7.006s
17:17:06.261 Error: Exited with 1
17:17:06.261    at ChildProcess.<anonymous> (/zeit/ab5350c9de262234/.build-utils/.builder/node_modules/@now/static-build/dist/index.js:33891:24)
17:17:06.261    at ChildProcess.emit (events.js:223:5)
17:17:06.261    at ChildProcess.EventEmitter.emit (domain.js:475:20)
17:17:06.261    at maybeClose (internal/child_process.js:1021:16)
17:17:06.261    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
17:17:06.601 worker exited with code 20 and signal null
17:17:07.900 Done with "package.json"

I'm using yarn and after I added other npm packages the ./node_modules/JetBrainsMono/web/woff/* folder is deleted.

I published a new version. I hope this fixes the above issue for you. Please let me know if it fixes it or not.

Thanks for reporting!

ystxn commented

New issue caused by 1.0.4. I've opened #4