Can't deploy site

I have a site using Local by Flywheel, Gatsby and Wordpress. I have made some adjustments from forums and some research but can’t determine the cause of why it’s not a successful launch.

Hey there, @ghgamble

Welcome to Netlify Forums! :netliconfetti: This is a great place to bring questions and collaborate with fellow community members. In order for us to help you better here, we will need a bit more information. Can you share your domain name as well as the Netlify site name? Additionally, please elaborate more on it being unsuccessful. What error do you receive?

Lastly, I see you poked around the forums a bit. This is always a great start! Here are two resources you can read through if you have not seen them already! “Page not found” and “Build troubleshooting tips.

In addition to what @hillary requested, it would be good to know if your build process works on your local system, and how you are trying to transfer the Gatsby files to Netlify.

1 Like

Hi @gregraven. Thanks for your help.

My build process does work on my local environment.

I’m using the CLI commands.

The error I get is this:

10:41:19 AM: success createSchemaCustomization - 0.006s

10:41:19 AM: error “gatsby-source-graphql” threw an error while running the sourceNodes lifecycle:
10:41:19 AM: request to http://testgatsbywp.local/graphql failed, reason: getaddrinfo ENOTFOUND testgatsbywp.local
10:41:19 AM:
10:41:19 AM:
10:41:19 AM: FetchError: request to http://testgatsbywp.local/graphql failed, reason: getad drinfo ENOTFOUND testgatsbywp.local
10:41:19 AM:
10:41:19 AM: - index.js:1461 ClientRequest.
10:41:19 AM: [repo]/[node-fetch]/lib/index.js:1461:11
10:41:19 AM:
10:41:19 AM: - destroy.js:92 emitErrorNT
10:41:19 AM: internal/streams/destroy.js:92:8
10:41:19 AM:
10:41:19 AM: - destroy.js:60 emitErrorAndCloseNT
10:41:19 AM: internal/streams/destroy.js:60:3
10:41:19 AM:
10:41:19 AM: - task_queues.js:84 processTicksAndRejections
10:41:19 AM: internal/process/task_queues.js:84:21
10:41:19 AM:
10:41:19 AM:
10:41:19 AM: not finished source and transform nodes - 0.135s
10:41:20 AM: npm ERR! code ELIFECYCLE
10:41:20 AM: npm ERR! errno 1
10:41:20 AM: npm ERR! gatsby-starter-default@0.1.0 build: gatsby build
10:41:20 AM: npm ERR! Exit status 1
10:41:20 AM: npm ERR!
10:41:20 AM: npm ERR! Failed at the gatsby-starter-default@0.1.0 build script.
10:41:20 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:41:20 AM: npm ERR! A complete log of this run can be found in:
10:41:20 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-03-08T15_41_20_019Z-debug.log
10:41:20 AM: ​
10:41:20 AM: ────────────────────────────────────────────────────────────────
10:41:20 AM: “build.command” failed
10:41:20 AM: ────────────────────────────────────────────────────────────────

And this is my code in the file that I believe the error is coming from.

module.exports = {
siteMetadata: {
title: GG Developer,
description: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.,
author: @gatsbyjs,
},
plugins: [
gatsby-plugin-react-helmet,
{
resolve: gatsby-source-graphql,
options: {
typeName: WPgraphql,
fieldName: wpgraphql,
url: http://testgatsbywp.local/graphql,
},
},
{
resolve: gatsby-source-filesystem,
options: {
name: images,
path: ${__dirname}/src/images,
},
},
gatsby-transformer-sharp,
gatsby-plugin-sharp,
{
resolve: gatsby-plugin-manifest,
options: {
name: gatsby-starter-default,
short_name: starter,
start_url: /,
background_color: #663399,
theme_color: #663399,
display: minimal-ui,
icon: src/images/custom-gg-icon.png, // This path is relative to the root of the site.
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// gatsby-plugin-offline,
],
}

The local by flywheel url seems to be causing an issue, but it’s building locally…

Also, here’s my site name: affectionate-rosalind-abc7cc

Although you might be getting a few errors prior, this seems to the be the main reason why your site is failing to deploy.

10:41:20 AM: “build.command” failed

Try npm run build

Sharing your Git repo would be useful to do further troubleshooting if this doesn’t workout for you.

I ended up getting it to run once, but then when I try to update it, can’t get it to work. I have a domain that I purchased that correctly has the DNS set up with flywheel to run the Wordpress site: https://www.grace-gamble.xyz/

This is the error I’m getting when I run the command ‘npm run build.’

A link to my repo: GitHub - ghgamble/personal-portfolio-site

I can run ‘npm run build’ successfully on my local install when I change the gatsby-config.js url from https://www.grace-gamble.xyz/graphql to my local install of my site at http://testgatsbywp.local/graphql. But since it’s not a local command for the netlify site, it doesn’t deploy successfully. Keeps failing. In hope someone can help.

> gatsby-starter-default@0.1.0 build

> gatsby build

success open and validate gatsby-configs - 0.046s

success load plugins - 0.443s

success onPreInit - 0.036s

success delete html and css files from previous builds - 0.006s

info One or more of your plugins have changed since the last time you ran Gatsby. As

a precaution, we're deleting your site's cache to ensure there's no stale data.

success initialize cache - 0.021s

success copy gatsby files - 0.056s

success onPreBootstrap - 0.011s

success createSchemaCustomization - 0.008s

ERROR #11321 PLUGIN

"gatsby-source-graphql" threw an error while running the sourceNodes lifecycle:

not finished source and transform nodes - 0.279s

npm ERR! code 1

npm ERR! path /Users/gracegamble/Documents/personal-portfolio-site/personal-portfolio

npm ERR! command failed

npm ERR! command sh -c gatsby build

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/gracegamble/.npm/_logs/2021-03-09T20_06_07_978Z-debug.log

Anyone available to help?

hey there, so, does this work locally? I am not sure what is happening here exactly.

It seems like you are having a graphql query issue?