Netlify build error
viperfx opened this issue · 6 comments
viperfx commented
Got this error on a build randomly. Works noramlly.
2:11:16 PM: error "gatsby-plugin-groq" threw an error while running the resolvableExtensions lifecycle:
2:11:16 PM: ENOTEMPTY: directory not empty, rmdir '/opt/build/repo/web/public/static/groq'
2:11:16 PM: 23 |
2:11:16 PM: 24 | if( !! fs.existsSync( GROQ_DIR ) ) {
2:11:16 PM: > 25 | fs.rmdirSync( GROQ_DIR, { recursive: true } );
2:11:16 PM: | ^
2:11:16 PM: 26 | }
2:11:16 PM: 27 | fs.mkdirSync( GROQ_DIR );
2:11:16 PM: 28 |
2:11:16 PM:
2:11:16 PM:
2:11:16 PM: Error: ENOTEMPTY: directory not empty, rmdir '/opt/build/repo/web/public/stati c/groq
viperfx commented
Another stack track using latest version alpha7
8:31:39 AM: error /opt/build/repo/web/src/pages/templates.js
8:31:39 AM:
8:31:39 AM: TypeError: processedQuery.matchAll(...) is not a function or its return value is not iterable
8:31:39 AM:
8:31:39 AM: `
8:31:39 AM: {
8:31:39 AM: "showcaseTemplates": *[_type == "reportTemplate"][0..4]{
8:31:39 AM: category,
8:31:39 AM: questions,
8:31:39 AM: isFeatured,
8:31:39 AM: scheduleType,
8:31:39 AM: "currentSlug": slug.current,
8:31:39 AM: summary,
8:31:39 AM: title,
8:31:39 AM: },
8:31:39 AM: "agileTemplates": *[_type == "reportTemplate" && category == "Agile"][0..2]{
8:31:39 AM: category,
8:31:39 AM: content,
8:31:39 AM: isFeatured,
8:31:39 AM: "currentSlug": slug.current,
8:31:39 AM: summary,
8:31:39 AM: title,
8:31:39 AM: "relatedTemplates": related[]->{title,summary, "currentSlug":slug.current}
8:31:39 AM: },
8:31:39 AM: "productivityTemplates": *[_type == "reportTemplate" && category == "Productivity"][0..2]{
8:31:39 AM: category,
8:31:39 AM: content,
8:31:39 AM: isFeatured,
8:31:39 AM: "currentSlug": slug.current,
8:31:39 AM: summary,
8:31:39 AM: title,
8:31:39 AM: "relatedTemplates": related[]->{title,summary, "currentSlug":slug.current}
8:31:39 AM: },
8:31:39 AM: "remoteTemplates": *[_type == "reportTemplate" && category == "Remote & Distributed"][0..2]{
8:31:39 AM: category,
8:31:39 AM: content,
8:31:39 AM: isFeatured,
8:31:39 AM: "currentSlug": slug.current,
8:31:39 AM: summary,
8:31:39 AM: title,
8:31:39 AM: "relatedTemplates": related[]->{title,summary, "currentSlug":slug.current}
8:31:39 AM: }
8:31:39 AM: }`
8:31:39 AM:
kmcaloon commented
Hey @viperfx thanks for the heads up. Looks like the matchAll()
method is only supported starting from node 12.0.0. The new 1.0.0-alpha.8
release should clear this up on Netlify.
viperfx commented
Thanks I am giving it a try.
I should note that I am using the following netlify plugin - https://github.com/jlengstorf/netlify-plugin-gatsby-cache
Which is meant to speed up builds. It might be causing the first error. When I clear cache and rebuild using the web UI, after a failed build, the error goes away.