gatsby-browser.js causes issue in mono-repo
CodySchaaf opened this issue · 2 comments
CodySchaaf commented
I'm working on adding this plugin to a theme which gatsby does by using yarn mono-repos. This causes the build to fail with
success createPages - 9.226s
success Checking for changed pages - 0.001s
success createPagesStatefully - 0.090s
success update schema - 0.294s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.124s
success onPostBootstrap - 0.130s
info bootstrap finished - 17.981s
success onPreExtractQueries - 0.001s
success extract queries from components - 1.010s
success write out requires - 0.131s
success run static queries - 0.084s - 11/11 131.66/s
success run page queries - 0.044s - 2/2 45.00/s
ERROR #98123 WEBPACK
Generating development JavaScript bundle failed
Unexpected token (31:4)
File: ../node_modules/gatsby-omni-font-loader/gatsby-browser.js:31:4
failed Building development bundle - 22.474s
Seems like there is a known fix for this following this example gatsbyjs/gatsby#19042 (comment)
CodySchaaf commented
I may have jumped the gun here. While trying to create a repo for you I think I fixed my current issue. I had it in the wrong package.json file (root instead of theme's sub package.json file). We probably can close for now. Will report back if there are any additional issues.
codeAdrian commented
Hi @CodySchaaf , thanks for reporting the issue and keeping me posted. Glad you've managed to find the fix in the meantime. Please let me know if the issue is not resolved and I'll have a look.