site: beta-tonycre8.netlify.app (or https://www.beta.tonycre8.co.uk)
Hey guys, having a little issue here. Trying to upload my Gatsby website onto Netlify as I’ve done in the past. However, I seem to be getting build errors here that I’m not getting when I build the project locally. Let’s compare some logs to give us a boost.
This is the local build
$ gatsby build
success open and validate gatsby-configs - 0.168s
success load plugins - 19.575s
warn The Google Analytics plugin requires a tracking ID. Did you mean to add it?
success onPreInit - 0.091s
success delete html and css files from previous builds - 0.181s
success initialize cache - 0.013s
success copy gatsby files - 0.904s
warn gatsby-plugin-feed was initialized in gatsby-config.js without a feeds option.
This means that the plugin will use the internal RSS feed creation, which may not match your use case.
This behavior will be removed in the next major release of gatsby-plugin-feed.
For more info, check out: https://gatsby.dev/adding-rss-feed
success onPreBootstrap - 0.143s
success createSchemaCustomization - 2.830s
success source and transform nodes - 0.992s
success building schema - 1.109s
success createPages - 0.187s
success createPagesStatefully - 0.318s
success onPreExtractQueries - 0.003s
success update schema - 0.080s
success extract queries from components - 1.383s
success write out requires - 0.059s
success write out redirect data - 0.007s
success Build manifest and related icons - 0.289s
success onPostBootstrap - 0.432s
⠀
info bootstrap finished - 87.339 s
⠀
success Building production JavaScript and CSS bundles - 43.384s
success Rewriting compilation hashes - 0.012s
success run queries - 44.799s - 23/23 0.51/s
success Building static HTML for pages - 5.120s - 20/20 3.91/s
info Done building in 137.758 sec
This is the Netlify build
5:43:06 PM: Build ready to start
5:43:08 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
5:43:08 PM: build-image tag: v3.3.7
5:43:08 PM: buildbot version: d305548225ac57bb00eb5a596b0b8674e76a4681
5:43:08 PM: Fetching cached dependencies
5:43:08 PM: Starting to download cache of 191.7MB
5:43:10 PM: Finished downloading cache in 1.579883728s
5:43:10 PM: Starting to extract cache
5:43:18 PM: Finished extracting cache in 8.516565393s
5:43:18 PM: Finished fetching cache in 10.143509197s
5:43:18 PM: Starting to prepare the repo for build
5:43:19 PM: Preparing Git Reference refs/heads/master
5:43:20 PM: Starting build script
5:43:20 PM: Installing dependencies
5:43:21 PM: Started restoring cached node version
5:43:24 PM: Finished restoring cached node version
5:43:25 PM: v10.20.1 is already installed.
5:43:25 PM: Now using node v10.20.1 (npm v6.14.4)
5:43:26 PM: Attempting ruby version 2.6.2, read from environment
5:43:27 PM: Using ruby version 2.6.2
5:43:27 PM: Using PHP version 5.6
5:43:27 PM: Started restoring cached node modules
5:43:27 PM: Finished restoring cached node modules
5:43:27 PM: Installing NPM modules using NPM version 6.14.4
5:43:43 PM: npm
5:43:43 PM: WARN bootstrap@4.4.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
5:43:43 PM: npm
5:43:43 PM: WARN slick-carousel@1.8.1 requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself.
5:43:43 PM: npm WARN
5:43:43 PM: 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.
5:43:43 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents):
5:43:43 PM: npm WARN
5:43:43 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:43:43 PM: npm
5:43:43 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
5:43:43 PM: npm
5:43:43 PM: WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:43:43 PM: added 6 packages from 45 contributors, removed 1 package and audited 30130 packages in 14.911s
5:43:45 PM: 74 packages are looking for funding
5:43:45 PM: run `npm fund` for details
5:43:45 PM: found 86 vulnerabilities (75 low, 2 moderate, 9 high)
5:43:45 PM: run `npm audit fix` to fix them, or `npm audit` for details
5:43:45 PM: NPM modules installed
5:43:45 PM: Started restoring cached go cache
5:43:45 PM: Finished restoring cached go cache
5:43:45 PM: unset GOOS;
5:43:45 PM: unset GOARCH;
5:43:45 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
5:43:45 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
5:43:45 PM: go version >&2;
5:43:45 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
5:43:45 PM: go version go1.12 linux/amd64
5:43:45 PM: Installing missing commands
5:43:45 PM: Verify run directory
5:43:45 PM: Executing user command: gatsby build
5:43:48 PM: success open and validate gatsby-configs - 0.072s
5:43:49 PM: success load plugins - 1.023s
5:43:49 PM: warning The Google Analytics plugin requires a tracking ID. Did you mean to add it?
5:43:49 PM: success onPreInit - 0.009s
5:43:49 PM: success delete html and css files from previous builds - 0.012s
5:43:49 PM: success initialize cache - 0.010s
5:43:49 PM: success copy gatsby files - 0.037s
5:43:49 PM: warning gatsby-plugin-feed was initialized in gatsby-config.js without a feeds option.
5:43:49 PM: This means that the plugin will use the internal RSS feed creation, which may not match your use case.
5:43:49 PM: This behavior will be removed in the next major release of gatsby-plugin-feed.
5:43:49 PM: For more info, check out: https://gatsby.dev/adding-rss-feed
5:43:49 PM: success onPreBootstrap - 0.007s
5:43:49 PM: success createSchemaCustomization - 0.184s
5:43:49 PM: error "gatsby-transformer-json" threw an error while running the onCreateNode lifecycle:
5:43:49 PM: Unexpected end of JSON input
5:43:49 PM: 61 |
5:43:49 PM: 62 | const content = await loadNodeContent(node);
5:43:49 PM: > 63 | const parsedContent = JSON.parse(content);
5:43:49 PM: | ^
5:43:49 PM: 64 |
5:43:49 PM: 65 | if (_.isArray(parsedContent)) {
5:43:49 PM: 66 | parsedContent.forEach((obj, i) => {
5:43:49 PM:
5:43:49 PM: SyntaxError: Unexpected end of JSON input
5:43:49 PM:
5:43:49 PM: - JSON.parse
5:43:49 PM:
5:43:49 PM: - gatsby-node.js:63 Object.onCreateNode
5:43:49 PM: [repo]/[gatsby-transformer-json]/gatsby-node.js:63:30
5:43:49 PM:
5:43:49 PM:
5:43:49 PM: not finished source and transform nodes - 0.307s
5:43:49 PM: Skipping functions preparation step: no functions directory set
5:43:49 PM: Caching artifacts
5:43:49 PM: Started saving node modules
5:43:49 PM: Finished saving node modules
5:43:49 PM: Started saving pip cache
5:43:50 PM: Finished saving pip cache
5:43:50 PM: Started saving emacs cask dependencies
5:43:50 PM: Finished saving emacs cask dependencies
5:43:50 PM: Started saving maven dependencies
5:43:50 PM: Finished saving maven dependencies
5:43:50 PM: Started saving boot dependencies
5:43:50 PM: Finished saving boot dependencies
5:43:50 PM: Started saving go dependencies
5:43:50 PM: Finished saving go dependencies
5:43:50 PM: Error running command: Build script returned non-zero exit code: 1
5:43:50 PM: Failing build: Failed to build site
5:43:50 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
5:43:50 PM: Finished processing build request in 42.148315473s
Here’s an image to accompany it of the current build settings I have.
I’m not sure what to do to fix this? The github repository by the way, is available for anyone to view and clone if I remember correctly, so you’re free to have a look at all the code. I’ve tried combing through all of my JSON files to see what if anything was wrong, but I could find any errors with any JSON code I wrote (you can find it under /components/portfolio/projects.json)
Can anyone help me out? I really want to get this site up and running, but I can’t find any way to fix the issue at hand.
Appreciate it in advance!