GraphQL...unix error: No such file or directory

8:40:45 PM: Build ready to start
8:40:47 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
8:40:47 PM: build-image tag: v3.3.7
8:40:47 PM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c
8:40:47 PM: Fetching cached dependencies
8:40:48 PM: Starting to download cache of 254.9KB
8:40:48 PM: Finished downloading cache in 93.939937ms
8:40:48 PM: Starting to extract cache
8:40:48 PM: Failed to fetch cache, continuing with build
8:40:48 PM: Starting to prepare the repo for build
8:40:48 PM: No cached dependencies found. Cloning fresh repo
8:40:48 PM: git clone https://github.com/mdleung/gatsby-blog
8:40:49 PM: Preparing Git Reference refs/heads/master
8:40:49 PM: Found Netlify configuration file netlify.toml in site root
8:40:49 PM: Found Netlify configuration file(s). Overriding site configuration
8:40:49 PM: Starting build script
8:40:49 PM: Installing dependencies
8:40:51 PM: v10.19.0 is already installed.
8:40:51 PM: Now using node v10.19.0 (npm v6.13.4)
8:40:52 PM: Attempting ruby version 2.6.2, read from environment
8:40:53 PM: Using ruby version 2.6.2
8:40:54 PM: Using PHP version 5.6
8:40:54 PM: Started restoring cached node modules
8:40:54 PM: Finished restoring cached node modules
8:40:54 PM: Installing NPM modules using NPM version 6.13.4
8:41:36 PM: > sharp@0.25.2 install /opt/build/repo/node_modules/gatsby-plugin-sharp/node_modules/sharp
8:41:36 PM: > (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
8:41:36 PM: info
8:41:36 PM: sharp
8:41:36 PM:  Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
8:41:38 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/core-js
8:41:38 PM: > node -e "try{require('./postinstall')}catch(e){}"
8:41:39 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
8:41:39 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
8:41:39 PM: > https://opencollective.com/core-js 
8:41:39 PM: > https://www.patreon.com/zloirock 
8:41:39 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
8:41:39 PM: > core-js-pure@3.6.4 postinstall /opt/build/repo/node_modules/core-js-pure
8:41:39 PM: > node -e "try{require('./postinstall')}catch(e){}"
8:41:39 PM: > gatsby-telemetry@1.2.1 postinstall /opt/build/repo/node_modules/gatsby-telemetry
8:41:39 PM: > node src/postinstall.js || true
8:41:39 PM: > cwebp-bin@5.1.0 postinstall /opt/build/repo/node_modules/cwebp-bin
8:41:39 PM: > node lib/install.js
8:41:40 PM:   ✔ cwebp pre-build test passed successfully
8:41:40 PM: > mozjpeg@6.0.1 postinstall /opt/build/repo/node_modules/mozjpeg
8:41:40 PM: > node lib/install.js
8:41:40 PM:   ✔ mozjpeg pre-build test passed successfully
8:41:40 PM: > pngquant-bin@5.0.2 postinstall /opt/build/repo/node_modules/pngquant-bin
8:41:40 PM: > node lib/install.js
8:41:41 PM:   ✔ pngquant pre-build test passed successfully
8:41:41 PM: > gatsby-cli@2.11.1 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
8:41:41 PM: > node scripts/postinstall.js
8:41:41 PM: > gatsby@2.20.4 postinstall /opt/build/repo/node_modules/gatsby
8:41:41 PM: > node scripts/postinstall.js
8:41:44 PM: npm
8:41:44 PM:  WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/fsevents):
8:41:44 PM: npm WARN
8:41:44 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:41:44 PM: npm
8:41:44 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/gatsby/node_modules/fsevents):
8:41:44 PM: npm WARN
8:41:44 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:41:44 PM: npm WARN
8:41:44 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/gatsby-page-utils/node_modules/fsevents):
8:41:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:41:44 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents):
8:41:44 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
8:41:44 PM: added 2238 packages from 1015 contributors and audited 28157 packages in 49.503s
8:41:47 PM: 76 packages are looking for funding
8:41:47 PM:   run `npm fund` for details
8:41:47 PM: found 29 vulnerabilities (20 low, 9 high)
8:41:47 PM:   run `npm audit fix` to fix them, or `npm audit` for details
8:41:47 PM: NPM modules installed
8:41:47 PM: Started restoring cached go cache
8:41:47 PM: Finished restoring cached go cache
8:41:47 PM: unset GOOS;
8:41:47 PM: unset GOARCH;
8:41:47 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
8:41:47 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
8:41:47 PM: go version >&2;
8:41:47 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
8:41:48 PM: go version go1.12 linux/amd64
8:41:48 PM: Installing missing commands
8:41:48 PM: Verify run directory
8:41:48 PM: Executing user command: gatsby build
8:41:50 PM: success open and validate gatsby-configs - 0.033s
8:41:51 PM: success load plugins - 1.174s
8:41:51 PM: success onPreInit - 0.003s
8:41:51 PM: success delete html and css files from previous builds - 0.021s
8:41:51 PM: success initialize cache - 0.009s
8:41:51 PM: success copy gatsby files - 0.043s
8:41:51 PM: success onPreBootstrap - 0.020s
8:41:52 PM: success createSchemaCustomization - 0.008s
8:41:52 PM: Starting to fetch data from Contentful
8:41:52 PM: Fetching default locale
8:41:52 PM: default locale is : en-US
8:41:52 PM: contentTypes fetched 2
8:41:52 PM: Updated entries  4
8:41:52 PM: Deleted entries  0
8:41:52 PM: Updated assets  4
8:41:52 PM: Deleted assets  0
8:41:52 PM: Fetch Contentful data: 312.754ms
8:41:52 PM: success source and transform nodes - 0.427s
8:41:52 PM: success building schema - 0.467s
8:41:52 PM: success createPages - 0.046s
8:41:53 PM: success createPagesStatefully - 0.071s
8:41:53 PM: success onPreExtractQueries - 0.002s
8:41:53 PM: success update schema - 0.035s
8:41:53 PM: success extract queries from components - 0.405s
8:41:53 PM: success write out requires - 0.006s
8:41:53 PM: success write out redirect data - 0.001s
8:41:53 PM: success onPostBootstrap - 0.000s
8:41:53 PM: ⠀
8:41:53 PM: info bootstrap finished - 5.352 s
8:41:53 PM: ⠀
8:42:09 PM: warning chunk styles [mini-css-extract-plugin]
8:42:09 PM: Conflicting order. Following module has been added:
8:42:09 PM:  * css ./node_modules/css-loader??ref--12-oneOf-1-1!./node_modules/postcss-loader/src??postcss-2!./src/components/base.css
8:42:09 PM: despite it was not able to fulfill desired ordering with these modules:
8:42:09 PM:  * css ./node_modules/css-loader??ref--12-oneOf-0-1!./node_modules/postcss-loader/src??postcss-1!./src/components/hero.module.css
8:42:09 PM:    - couldn't fulfill desired order of chunk group(s) component---src-pages-index-js
8:42:09 PM:    - while fulfilling desired order of chunk group(s) component---src-templates-blog-post-js
8:42:09 PM: warning chunk styles [mini-css-extract-plugin]
8:42:09 PM: Conflicting order. Following module has been added:
8:42:09 PM:  * css ./node_modules/css-loader??ref--12-oneOf-0-1!./node_modules/postcss-loader/src??postcss-1!./src/components/navigation.module.css
8:42:09 PM: despite it was not able to fulfill desired ordering with these modules:
8:42:09 PM:  * css ./node_modules/css-loader??ref--12-oneOf-0-1!./node_modules/postcss-loader/src??postcss-1!./src/components/hero.module.css
8:42:09 PM:    - couldn't fulfill desired order of chunk group(s) component---src-pages-index-js
8:42:09 PM:    - while fulfilling desired order of chunk group(s) component---src-templates-blog-post-js
8:42:09 PM: success Building production JavaScript and CSS bundles - 16.432s
8:42:10 PM: success Rewriting compilation hashes - 0.001s
8:42:12 PM: error There was an error in your GraphQL query:
8:42:12 PM: /tmp/a1c1f224789e11f1e3723b8d860bfc4a-webcam-3/24/2020, 3:03:15 PM.png-6ce06c985a63ca067fa773978f8dc759..png: unable to open for write
8:42:12 PM: unix error: No such file or directory
8:42:12 PM:    1 | fragment GatsbyContentfulFluid_tracedSVG on ContentfulFluid {
8:42:12 PM: >  2 |   tracedSVG
8:42:12 PM:      |   ^
8:42:12 PM:    3 |   aspectRatio
8:42:12 PM:    4 |   src
8:42:12 PM:    5 |   srcSet
8:42:12 PM:    6 |   sizes
8:42:12 PM:    7 | }
8:42:12 PM:    8 |
8:42:12 PM:    9 | query HomeQuery {
8:42:12 PM:   10 |   allContentfulBlogPost(sort: {fields: [publishDate], order: DESC}) {
8:42:12 PM:   11 |     edges {
8:42:12 PM:   12 |       node {
8:42:12 PM: File path: /opt/build/repo/src/pages/index.js
8:42:12 PM: Url path: /
8:42:12 PM: Plugin: none
8:42:12 PM: not finished run queries - 19.266s
8:42:12 PM: Skipping functions preparation step: no functions directory set
8:42:12 PM: Caching artifacts
8:42:12 PM: Started saving node modules
8:42:12 PM: Finished saving node modules
8:42:12 PM: Started saving pip cache
8:42:12 PM: Finished saving pip cache
8:42:12 PM: Started saving emacs cask dependencies
8:42:12 PM: Finished saving emacs cask dependencies
8:42:12 PM: Started saving maven dependencies
8:42:12 PM: Finished saving maven dependencies
8:42:12 PM: Started saving boot dependencies
8:42:13 PM: Finished saving boot dependencies
8:42:13 PM: Started saving go dependencies
8:42:13 PM: Finished saving go dependencies
8:42:16 PM: Error running command: Build script returned non-zero exit code: 1
8:42:16 PM: Failing build: Failed to build site
8:42:16 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
8:42:16 PM: Finished processing build request in 1m28.447122284s

hi there, welcome.

please use proper code formatting for long code sequences by putting ``` around them, thanks! makes things much easier to read.

so this is indeed the problem:

error There was an error in your GraphQL query:
8:42:12 PM: /tmp/a1c1f224789e11f1e3723b8d860bfc4a-webcam-3/24/2020, 3:03:15 PM.png-6ce06c985a63ca067fa773978f8dc759..png: unable to open for write
8:42:12 PM: unix error: No such file or directory
8:42:12 PM:    1 | fragment GatsbyContentfulFluid_tracedSVG on ContentfulFluid {
8:42:12 PM: >  2 |   tracedSVG
8:42:12 PM:      |   ^
8:42:12 PM:    3 |   aspectRatio
8:42:12 PM:    4 |   src
8:42:12 PM:    5 |   srcSet
8:42:12 PM:    6 |   sizes
8:42:12 PM:    7 | }
8:42:12 PM:    8 |
8:42:12 PM:    9 | query HomeQuery {
8:42:12 PM:   10 |   allContentfulBlogPost(sort: {fields: [publishDate], order: DESC}) {
8:42:12 PM:   11 |     edges {
8:42:12 PM:   12 |       node {
8:42:12 PM: File path: /opt/build/repo/src/pages/index.js

First thing you’ll want to check is whether your site builds locally. does it? It seems like your GraphQL is unhappy.

If not, here are some useful tips on debugging:

if you are still having problems after working through those guides, let us know :muscle:!

1 Like