Hello I am very knew to using netlify and in fact to the whole web development. I learnt about Gatsby and netlify and thought to myself to see what can be done. I have this website that is running locally without any error. I have infact built it locally and didnβt have any errors. Now when I wanted to deploy it, I keep getting this strange error about Netlify not being able to resolve a file and then it fails the build. Noe I have attached necessary screenshot and build log along with my repository link. I just donβt understand what is the problem and have been frustrated by it. Would their be anyone who could help me please. I will be utterly grateful!
Github Repository: GitHub - sjsajju/stairways
Netlify Site Name: https://blissful-bhaskara-e2460a.netlify.app/
Build Log:
######################################################################
6:30:02 PM: Waiting for other deploys from your team to complete
6:31:34 PM: Build ready to start
6:31:35 PM: build-image version: 253f72909528f25a82c4640ca58f2e974d52abd9
6:31:35 PM: build-image tag: v3.4.4
6:31:35 PM: buildbot version: d7fbddb77714d524c4b4de0312067b122124afee
6:31:35 PM: Building without cache
6:31:35 PM: Starting to prepare the repo for build
6:31:36 PM: No cached dependencies found. Cloning fresh repo
6:31:36 PM: git clone https://github.com/sjsajju/stairways
6:31:50 PM: Preparing Git Reference refs/heads/master
6:31:52 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
6:31:53 PM: Starting build script
6:31:53 PM: Installing dependencies
6:31:53 PM: Python version set to 2.7
6:31:54 PM: v12.18.0 is already installed.
6:31:54 PM: Now using node v12.18.0 (npm v6.14.4)
6:31:54 PM: Started restoring cached build plugins
6:31:54 PM: Finished restoring cached build plugins
6:31:55 PM: Attempting ruby version 2.7.1, read from environment
6:31:56 PM: Using ruby version 2.7.1
6:31:56 PM: Using PHP version 5.6
6:31:56 PM: 5.2 is already installed.
6:31:56 PM: Using Swift version 5.2
6:31:56 PM: Started restoring cached node modules
6:31:57 PM: Finished restoring cached node modules
6:31:58 PM: Installing NPM modules using NPM version 6.14.4
6:32:50 PM: > sharp@0.25.4 install /opt/build/repo/node_modules/sharp
6:32:50 PM: > (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
6:32:51 PM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
6:32:54 PM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
6:32:54 PM: > node -e "try{require('./postinstall')}catch(e){}"
6:32:54 PM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js
6:32:54 PM: > node -e "try{require('./postinstall')}catch(e){}"
6:32:54 PM: > core-js-pure@3.6.5 postinstall /opt/build/repo/node_modules/core-js-pure
6:32:54 PM: > node -e "try{require('./postinstall')}catch(e){}"
6:32:55 PM: > gatsby-telemetry@1.3.35 postinstall /opt/build/repo/node_modules/gatsby-telemetry
6:32:55 PM: > node src/postinstall.js || true
6:32:55 PM: > mozjpeg@7.0.0 postinstall /opt/build/repo/node_modules/mozjpeg
6:32:55 PM: > node lib/install.js
6:32:56 PM: β mozjpeg pre-build test passed successfully
6:32:56 PM: > pngquant-bin@6.0.0 postinstall /opt/build/repo/node_modules/pngquant-bin
6:32:56 PM: > node lib/install.js
6:32:56 PM: β pngquant pre-build test passed successfully
6:32:56 PM: > gatsby-cli@2.12.98 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
6:32:56 PM: > node scripts/postinstall.js
6:32:56 PM: > gatsby@2.24.61 postinstall /opt/build/repo/node_modules/gatsby
6:32:56 PM: > node scripts/postinstall.js
6:33:00 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
6:33:00 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:33:00 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/chokidar/node_modules/fsevents):
6:33:00 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
6:33:00 PM: added 2393 packages from 1334 contributors and audited 2400 packages in 61.309s
6:33:02 PM: 174 packages are looking for funding
6:33:02 PM: run `npm fund` for details
6:33:02 PM: found 4 vulnerabilities (1 low, 3 high)
6:33:02 PM: run `npm audit fix` to fix them, or `npm audit` for details
6:33:03 PM: NPM modules installed
6:33:03 PM: Started restoring cached go cache
6:33:03 PM: Finished restoring cached go cache
6:33:03 PM: go version go1.14.4 linux/amd64
6:33:03 PM: go version go1.14.4 linux/amd64
6:33:03 PM: Installing missing commands
6:33:03 PM: Verify run directory
6:33:04 PM: β
6:33:04 PM: βββββββββββββββββββββββββββββββ
6:33:04 PM: β Netlify Build β
6:33:04 PM: βββββββββββββββββββββββββββββββ
6:33:04 PM: β
6:33:04 PM: β― Version
6:33:04 PM: @netlify/build 5.2.1
6:33:04 PM: β
6:33:04 PM: β― Flags
6:33:04 PM: deployId: 5fa7f2daab38894d6f2e9201
6:33:04 PM: mode: buildbot
6:33:04 PM: β
6:33:04 PM: β― Current directory
6:33:04 PM: /opt/build/repo
6:33:04 PM: β
6:33:04 PM: β― Config file
6:33:04 PM: No config file was defined: using default values.
6:33:04 PM: β
6:33:04 PM: β― Context
6:33:04 PM: production
6:33:04 PM: β
6:33:04 PM: βββββββββββββββββββββββββββββββββββββ
6:33:04 PM: β 1. Build command from Netlify app β
6:33:04 PM: βββββββββββββββββββββββββββββββββββββ
6:33:04 PM: β
6:33:04 PM: $ gatsby build
6:33:07 PM: success open and validate gatsby-configs - 0.018s
6:33:07 PM: success load plugins - 0.568s
6:33:07 PM: success onPreInit - 0.027s
6:33:07 PM: success delete html and css files from previous builds - 0.006s
6:33:07 PM: success initialize cache - 0.005s
6:33:07 PM: success copy gatsby files - 0.043s
6:33:07 PM: success onPreBootstrap - 0.018s
6:33:08 PM: success createSchemaCustomization - 0.004s
6:33:08 PM: success Checking for changed pages - 0.000s
6:33:08 PM: success source and transform nodes - 0.141s
6:33:08 PM: success building schema - 0.400s
6:33:08 PM: info Total nodes: 45, SitePage nodes: 1 (use --verbose for breakdown)
6:33:08 PM: success createPages - 0.001s
6:33:08 PM: success Checking for changed pages - 0.000s
6:33:08 PM: success createPagesStatefully - 0.077s
6:33:08 PM: success update schema - 0.025s
6:33:08 PM: success onPreExtractQueries - 0.001s
6:33:09 PM: success extract queries from components - 0.412s
6:33:09 PM: success write out redirect data - 0.001s
6:33:09 PM: success Build manifest and related icons - 0.143s
6:33:09 PM: success onPostBootstrap - 0.145s
6:33:09 PM: info bootstrap finished - 4.673s
6:33:09 PM: success run static queries - 0.016s - 2/2 125.28/s
6:33:09 PM: success run page queries - 0.012s - 5/5 408.44/s
6:33:09 PM: success write out requires - 0.004s
6:33:25 PM: failed Building production JavaScript and CSS bundles - 15.808s
6:33:25 PM: error Generating JavaScript bundles failed
6:33:25 PM: Can't resolve '../components/layout' in '/opt/build/repo/src/pages'
6:33:25 PM: If you're trying to use a package make sure that '../components/layout' is installed. If you're trying to use a local file make sure that the path is correct.
6:33:25 PM: error Generating JavaScript bundles failed
6:33:25 PM: Can't resolve '../components/layout' in '/opt/build/repo/src/pages'
6:33:25 PM: If you're trying to use a package make sure that '../components/layout' is installed. If you're trying to use a local file make sure that the path is correct.
6:33:25 PM: error Generating JavaScript bundles failed
6:33:25 PM: Can't resolve '../components/layout' in '/opt/build/repo/src/pages'
6:33:25 PM: If you're trying to use a package make sure that '../components/layout' is installed. If you're trying to use a local file make sure that the path is correct.
6:33:25 PM: error Generating JavaScript bundles failed
6:33:25 PM: Can't resolve '../components/layout' in '/opt/build/repo/src/pages'
6:33:25 PM: If you're trying to use a package make sure that '../components/layout' is installed. If you're trying to use a local file make sure that the path is correct.
6:33:25 PM: β
6:33:25 PM: βββββββββββββββββββββββββββββββ
6:33:25 PM: β "build.command" failed β
6:33:25 PM: βββββββββββββββββββββββββββββββ
6:33:25 PM: β
6:33:25 PM: Error message
6:33:25 PM: Command failed with exit code 1: gatsby build
6:33:25 PM: β
6:33:25 PM: Error location
6:33:25 PM: In Build command from Netlify app:
6:33:25 PM: gatsby build
6:33:25 PM: β
6:33:25 PM: Resolved config
6:33:25 PM: build:
6:33:25 PM: command: gatsby build
6:33:25 PM: commandOrigin: ui
6:33:25 PM: publish: /opt/build/repo/public
6:33:25 PM: Caching artifacts
6:33:25 PM: Started saving node modules
6:33:25 PM: Finished saving node modules
6:33:25 PM: Started saving build plugins
6:33:25 PM: Finished saving build plugins
6:33:25 PM: Started saving pip cache
6:33:25 PM: Finished saving pip cache
6:33:25 PM: Started saving emacs cask dependencies
6:33:25 PM: Finished saving emacs cask dependencies
6:33:25 PM: Started saving maven dependencies
6:33:25 PM: Finished saving maven dependencies
6:33:25 PM: Started saving boot dependencies
6:33:25 PM: Finished saving boot dependencies
6:33:25 PM: Started saving go dependencies
6:33:25 PM: Finished saving go dependencies
6:33:28 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:33:28 PM: Failing build: Failed to build site
6:33:28 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
6:33:28 PM: Finished processing build request in 1m52.652576089s
#######################################################################
Build Settings Screenshot: