Input File Missing Using gatsby-source-instagram

I am using the gatsby-source-instagram plugin to fetch instagram images. I am able to build the site locally (using gatsby develop and gatsby build) but when i push my changes and build on netlify it fails. I get the following error:

1:02:07 PM: error Failed to retrieve metadata from image /Users/Charles/Desktop/career/Projects/Perez Fitness/site/.cache/caches/gatsby-source-instagram/dfdfdb524d1e53a35ec7350acaf03191/58410853_169523687384295_8229251386197029619_n.jpg Input file is missing
1:02:07 PM: Error: Input file is missing
1:02:07 PM: not finished run queries - 10.599s
1:02:07 PM: not finished Generating image thumbnails - 10.572s

from my understanding it fails at the graphQL query and it attempts to the image file a file using an absolute path. Im new to gatsby so any help is appreciated. I attached the entire deploy log below incase it helps.

DEPLOY LOG:
1:00:57 PM: Build ready to start
1:00:59 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
1:00:59 PM: build-image tag: v3.3.7
1:00:59 PM: buildbot version: 134ec431c6a3ff76e87cc4dc34007fe13842272f
1:00:59 PM: Fetching cached dependencies
1:00:59 PM: Starting to download cache of 265.3MB
1:01:01 PM: Finished downloading cache in 2.052969439s
1:01:01 PM: Starting to extract cache
1:01:13 PM: Finished extracting cache in 12.544946721s
1:01:14 PM: Finished fetching cache in 14.672999634s
1:01:14 PM: Starting to prepare the repo for build
1:01:14 PM: Preparing Git Reference refs/heads/netlify
1:01:22 PM: Starting build script
1:01:22 PM: Installing dependencies
1:01:22 PM: Started restoring cached node version
1:01:29 PM: Finished restoring cached node version
1:01:30 PM: v10.20.1 is already installed.
1:01:30 PM: Now using node v10.20.1 (npm v6.14.4)
1:01:31 PM: Attempting ruby version 2.6.2, read from environment
1:01:32 PM: Using ruby version 2.6.2
1:01:32 PM: Using PHP version 5.6
1:01:32 PM: Started restoring cached node modules
1:01:35 PM: Finished restoring cached node modules
1:01:35 PM: Installing NPM modules using NPM version 6.14.4
1:01:48 PM: npm
1:01:48 PM: WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
1:01:48 PM: npm
1:01:48 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents):
1:01:48 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
1:01:48 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules/fsevents):
1:01:48 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
1:01:48 PM: added 1 package from 1 contributor and audited 28719 packages in 12.078s
1:01:49 PM: 60 packages are looking for funding
1:01:49 PM: run npm fund for details
1:01:49 PM: found 0 vulnerabilities
1:01:49 PM: NPM modules installed
1:01:50 PM: Started restoring cached go cache
1:01:50 PM: Finished restoring cached go cache
1:01:50 PM: unset GOOS;
1:01:50 PM: unset GOARCH;
1:01:50 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.12.linux.amd64’;
1:01:50 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}”;
1:01:50 PM: go version >&2;
1:01:50 PM: export GIMME_ENV=‘/opt/buildhome/.gimme/env/go1.12.linux.amd64.env’;
1:01:50 PM: go version go1.12 linux/amd64
1:01:50 PM: Installing missing commands
1:01:50 PM: Verify run directory
1:01:50 PM: Executing user command: gatsby build
1:01:52 PM: success open and validate gatsby-configs - 0.030s
1:01:53 PM: success load plugins - 1.041s
1:01:53 PM: success onPreInit - 0.003s
1:01:53 PM: success delete html and css files from previous builds - 0.020s
1:01:53 PM: success initialize cache - 0.006s
1:01:53 PM: success copy gatsby files - 0.046s
1:01:53 PM: success onPreBootstrap - 0.016s
1:01:53 PM: success createSchemaCustomization - 0.007s
1:01:55 PM: success source and transform nodes - 1.546s
1:01:55 PM: success building schema - 0.378s
1:01:55 PM: success createPages - 0.000s
1:01:55 PM: success createPagesStatefully - 0.071s
1:01:55 PM: success onPreExtractQueries - 0.000s
1:01:55 PM: success update schema - 0.024s
1:01:56 PM: success extract queries from components - 0.344s
1:01:56 PM: success write out requires - 0.006s
1:01:56 PM: success write out redirect data - 0.001s
1:01:56 PM: warning The icon(src/images/logo.png) you provided to ‘gatsby-plugin-manifest’ is not square.
1:01:56 PM: The icons we generate will be square and for the best results we recommend you provide a square icon.
1:01:57 PM: success Build manifest and related icons - 0.898s
1:01:57 PM: success onPostBootstrap - 0.899s
1:01:57 PM: ⠀
1:01:57 PM: info bootstrap finished - 6.659 s
1:01:57 PM: ⠀
1:02:07 PM: success Building production JavaScript and CSS bundles - 9.518s
1:02:07 PM: success Rewriting compilation hashes - 0.006s
1:02:07 PM: error Failed to retrieve metadata from image /Users/Charles/Desktop/career/Projects/Perez Fitness/site/.cache/caches/gatsby-source-instagram/dfdfdb524d1e53a35ec7350acaf03191/58410853_169523687384295_8229251386197029619_n.jpg Input file is missing
1:02:07 PM:
1:02:07 PM: Error: Input file is missing
1:02:07 PM:
1:02:07 PM: not finished run queries - 10.599s
1:02:07 PM: not finished Generating image thumbnails - 10.572s
1:02:07 PM: Skipping functions preparation step: no functions directory set
1:02:07 PM: Caching artifacts
1:02:07 PM: Started saving node modules
1:02:07 PM: Finished saving node modules
1:02:07 PM: Started saving pip cache
1:02:07 PM: Finished saving pip cache
1:02:07 PM: Started saving emacs cask dependencies
1:02:07 PM: Finished saving emacs cask dependencies
1:02:07 PM: Started saving maven dependencies
1:02:07 PM: Finished saving maven dependencies
1:02:07 PM: Started saving boot dependencies
1:02:07 PM: Finished saving boot dependencies
1:02:07 PM: Started saving go dependencies
1:02:07 PM: Finished saving go dependencies
1:02:07 PM: Error running command: Build script returned non-zero exit code: 1
1:02:07 PM: failed during stage ‘building site’: Build script returned non-zero exit code: 1
1:02:07 PM: Failing build: Failed to build site
1:02:07 PM: Finished processing build request in 1m8.7827745s

1:02:07 PM:

1:02:07 PM: Error: Input file is missing

1:02:07 PM:

1:02:07 PM: not finished run queries - 10.599s

1:02:07 PM: not finished Generating image thumbnails - 10.572s

hi there,

it sounds a bit like there is something funky going on with that specific image - maybe it is malformed in some way.

one way to maybe test that is to remove that image and see if the build runs properly without? i’m guessing you need the image, but if it is what is breaking the build then we’d want to know that first.

fixed the problem! I forgot to add the .cache folder to the .gitignore file. Thanks for your help!

1 Like