Unable to deploy site with Netlify

Hello,

I have a WordPress instance with OVH at admin.camillenivollet.com and I try to deploy my Gatsby site with Netlify on a custom domain camillenivollet.com. I successfully deployed the build yesterday but from today I can’t deploy anymore my site.

This is my log :

Summary
10:02:14 PM: Build ready to start
10:02:16 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
10:02:16 PM: build-image tag: v3.3.20
10:02:16 PM: buildbot version: be8ecf2af866e16fa4301cc5c14de2ccbbb21cf4
10:02:17 PM: Fetching cached dependencies
10:02:17 PM: Starting to download cache of 254.8KB
10:02:17 PM: Finished downloading cache in 79.658425ms
10:02:17 PM: Starting to extract cache
10:02:17 PM: Failed to fetch cache, continuing with build
10:02:17 PM: Starting to prepare the repo for build
10:02:17 PM: No cached dependencies found. Cloning fresh repo
10:02:17 PM: git clone https://github.com/firestar300/camillenivollet
10:02:20 PM: Preparing Git Reference refs/heads/master
10:02:21 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
10:02:21 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public/public' versus 'public' in the Netlify UI
10:02:21 PM: Starting build script
10:02:21 PM: Installing dependencies
10:02:21 PM: Python version set to 2.7
10:02:22 PM: v12.18.0 is already installed.
10:02:23 PM: Now using node v12.18.0 (npm v6.14.4)
10:02:23 PM: Started restoring cached build plugins
10:02:23 PM: Finished restoring cached build plugins
10:02:23 PM: Attempting ruby version 2.7.1, read from environment
10:02:25 PM: Using ruby version 2.7.1
10:02:25 PM: Using PHP version 5.6
10:02:25 PM: 5.2 is already installed.
10:02:25 PM: Using Swift version 5.2
10:02:25 PM: Started restoring cached node modules
10:02:25 PM: Finished restoring cached node modules
10:02:25 PM: Started restoring cached yarn cache
10:02:25 PM: Finished restoring cached yarn cache
10:02:25 PM: Installing yarn at version 1.22.4
10:02:25 PM: Installing Yarn!
10:02:25 PM: > Downloading tarball...
10:02:25 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.237PTHCUva
10:02:25 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
10:02:25 PM:                                  Dload  Upload   Total   Spent    Left  Speed
10:02:25 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
10:02:25 PM: 100    80  100    80    0     0    257      0 --:--:-- --:--:-- --:--:--   258
10:02:26 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
10:02:26 PM: 100    93  100    93    0     0    149      0 --:--:-- --:--:-- --:--:--  1937
10:02:26 PM: 100   630  100   630    0     0    598      0  0:00:01  0:00:01 --:--:--   598
10:02:27 PM: 100 1215k  100 1215k    0     0   838k      0  0:00:01  0:00:01 --:--:--  838k
10:02:27 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.237PTHCUva.asc
10:02:27 PM: 100    84  100    84    0     0   1097      0 --:--:-- --:--:-- --:--:--  1097
10:02:27 PM: 100    97  100    97    0     0    932      0 --:--:-- --:--:-- --:--:--   932
10:02:27 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
10:02:27 PM: 100   634  100   634    0     0   2733      0 --:--:-- --:--:-- --:--:--  309k
10:02:27 PM: 100  1028  100  1028    0     0   3776      0 --:--:-- --:--:-- --:--:--  3776
10:02:27 PM: > Verifying integrity...
10:02:27 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
10:02:27 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
10:02:27 PM: gpg: WARNING: This key is not certified with a trusted signature!
10:02:27 PM: gpg:          There is no indication that the signature belongs to the owner.
10:02:27 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
10:02:27 PM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
10:02:27 PM: > GPG signature looks good
10:02:27 PM: > Extracting to ~/.yarn...
10:02:27 PM: > Adding to $PATH...
10:02:27 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.
10:02:28 PM: Installing NPM modules using Yarn version 1.22.4
10:02:28 PM: yarn install v1.22.4
10:02:28 PM: [1/4] Resolving packages...
10:02:29 PM: [2/4] Fetching packages...
10:02:34 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader".
10:02:54 PM: info fsevents@2.1.2: The platform "linux" is incompatible with this module.
10:02:54 PM: info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
10:02:54 PM: info fsevents@1.2.12: The platform "linux" is incompatible with this module.
10:02:54 PM: info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
10:02:54 PM: [3/4] Linking dependencies...
10:02:54 PM: warning "gatsby > @pmmmwh/react-refresh-webpack-plugin@0.3.1" has incorrect peer dependency "react-refresh@^0.8.2".
10:02:54 PM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "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".
10:02:54 PM: warning "gatsby-plugin-sass > sass-loader@7.3.1" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
10:02:54 PM: warning "gatsby-plugin-transition-link > babel-preset-gatsby-package > @babel/preset-flow@7.9.0" has unmet peer dependency "@babel/core@^7.0.0-0".
10:02:54 PM: warning "gatsby-plugin-transition-link > babel-preset-gatsby-package > @babel/preset-flow > @babel/plugin-transform-flow-strip-types@7.9.0" has unmet peer dependency "@babel/core@^7.0.0-0".
10:02:54 PM: warning "gatsby-plugin-transition-link > babel-preset-gatsby-package > @babel/preset-flow > @babel/plugin-transform-flow-strip-types > @babel/plugin-syntax-flow@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
10:03:13 PM: [4/4] Building fresh packages...
10:03:18 PM: Done in 49.85s.
10:03:18 PM: NPM modules installed using Yarn
10:03:18 PM: Started restoring cached go cache
10:03:18 PM: Finished restoring cached go cache
10:03:18 PM: go version go1.14.4 linux/amd64
10:03:18 PM: go version go1.14.4 linux/amd64
10:03:19 PM: Installing missing commands
10:03:19 PM: Verify run directory
10:03:20 PM: ​
10:03:20 PM: ┌─────────────────────────────┐
10:03:20 PM: │        Netlify Build        │
10:03:20 PM: └─────────────────────────────┘
10:03:20 PM: ​
10:03:20 PM: ❯ Version
10:03:20 PM:   @netlify/build 3.0.1
10:03:20 PM: ​
10:03:20 PM: ❯ Flags
10:03:20 PM:   deployId: 5f1de146e1fec45ddf0319f8
10:03:20 PM:   mode: buildbot
10:03:20 PM: ​
10:03:20 PM: ❯ Current directory
10:03:20 PM:   /opt/build/repo/public
10:03:20 PM: ​
10:03:20 PM: ❯ Config file
10:03:20 PM:   No config file was defined: using default values.
10:03:20 PM: ​
10:03:20 PM: ❯ Context
10:03:20 PM:   production
10:03:20 PM: ​
10:03:20 PM: ┌───────────────────────────────────┐
10:03:20 PM: │ 1. Build command from Netlify app │
10:03:20 PM: └───────────────────────────────────┘
10:03:20 PM: ​
10:03:20 PM: $ gatsby build
10:03:22 PM: Using environment config: 'production'
10:03:22 PM: success open and validate gatsby-configs - 0.028s
10:03:23 PM: success load plugins - 0.750s
10:03:23 PM: success onPreInit - 0.009s
10:03:23 PM: success delete html and css files from previous builds - 0.011s
10:03:23 PM: success initialize cache - 0.008s
10:03:23 PM: success copy gatsby files - 0.041s
10:03:23 PM: success onPreBootstrap - 0.007s
10:03:23 PM: success createSchemaCustomization - 0.004s
10:03:25 PM: 
10:03:25 PM: Path: /wp-json/acf/v3/options/options/?per_page=100&page=1
10:03:25 PM: The server response was "404 Not Found"
10:03:25 PM: Inner exception message: "Aucun itinéraire n’a été trouvé correspondant à l’URL et à la méthode de requête"
10:03:26 PM:  -> wordpress__menus_menus_items fetched : 1
10:03:26 PM:  -> wordpress__menus_menus fetched : 1
10:03:26 PM:  -> wordpress__PAGE fetched : 1
10:03:27 PM: The request failed with error code "ENOTFOUND"
10:03:27 PM: The request failed with error code "ENOTFOUND"
10:03:27 PM: success source and transform nodes - 3.640s
10:03:27 PM: success building schema - 0.487s
10:03:27 PM: error There was an error in your GraphQL query:
10:03:27 PM: Cannot query field "allWordpressWpProject" on type "Query".
10:03:27 PM: If you don't expect "allWordpressWpProject" to exist on the type "Query" it is most likely a typo.However, if you expect "allWordpressWpProject" to exist there are a couple of solutions to common problems:
10:03:27 PM: - If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
10:03:27 PM: - The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
10:03:27 PM: - You want to optionally use your field "allWordpressWpProject" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")
10:03:27 PM: It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "Query":https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions
10:03:27 PM: not finished createPages - 0.043s
10:03:27 PM: ​
10:03:27 PM: ┌─────────────────────────────┐
10:03:27 PM: │   "build.command" failed    │
10:03:27 PM: └─────────────────────────────┘
10:03:27 PM: ​
10:03:27 PM:   Error message
10:03:27 PM:   Command failed with exit code 1: gatsby build
10:03:27 PM: ​
10:03:27 PM:   Error location
10:03:27 PM:   In Build command from Netlify app:
10:03:27 PM:   gatsby build
10:03:27 PM: ​
10:03:27 PM:   Resolved config
10:03:27 PM:   build:
10:03:27 PM:     base: /opt/build/repo/public
10:03:27 PM:     command: gatsby build
10:03:27 PM:     commandOrigin: ui
10:03:27 PM:     environment:
10:03:27 PM:       - WP_BASE_URL
10:03:27 PM:       - WP_PROTOCOL
10:03:27 PM:     publish: /opt/build/repo/public/public
10:03:27 PM: Caching artifacts
10:03:27 PM: Started saving node modules
10:03:27 PM: Finished saving node modules
10:03:27 PM: Started saving build plugins
10:03:27 PM: Finished saving build plugins
10:03:27 PM: Started saving yarn cache
10:03:27 PM: Finished saving yarn cache
10:03:27 PM: Started saving pip cache
10:03:27 PM: Finished saving pip cache
10:03:27 PM: Started saving emacs cask dependencies
10:03:28 PM: Finished saving emacs cask dependencies
10:03:28 PM: Started saving maven dependencies
10:03:28 PM: Finished saving maven dependencies
10:03:28 PM: Started saving boot dependencies
10:03:28 PM: Finished saving boot dependencies
10:03:28 PM: Started saving go dependencies
10:03:28 PM: Finished saving go dependencies
10:03:31 PM: Error running command: Build script returned non-zero exit code: 1
10:03:31 PM: Failing build: Failed to build site
10:03:31 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
10:03:31 PM: Finished processing build request in 1m15.151436266s

When I try to launch my build on my localhost, it work as expected so I believe it’s an issue with Netlify or DNS configuration.

This is my gatbsy-config.js :

Summary

const activeEnv =
process.env.GATSBY_ACTIVE_ENV || process.env.NODE_ENV || ‘development’

console.log(Using environment config: '${activeEnv}')

require(‘dotenv’).config({
path: .env.${activeEnv},
})

module.exports = {
siteMetadata: {
title: Gatsby Default Starter,
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,
gatsby-plugin-transition-link,
{
resolve: gatsby-source-filesystem,
options: {
name: images,
path: ${__dirname}/src/images,
},
},
{
resolve: gatsby-plugin-sass,
options: {
useResolveUrlLoader: true,
options: {
encoding: false,
},
},
},
gatsby-transformer-sharp,
gatsby-plugin-sharp,
{
resolve: gatsby-plugin-sharp,
options: {
icon: src/images/favicon.png,
},
},
{
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/favicon.png, // This path is relative to the root of the site.
},
},
{
resolve: gatsby-source-wordpress,
options: {
baseUrl: process.env.WP_BASE_URL,
protocol: process.env.WP_PROTOCOL,
hostingWPCOM: false,
includedRoutes: ["/pages", "/project", “/media", "/menus”],
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// gatsby-plugin-offline,
],
}

The REST API is accessible here https://admin.camillenivollet.com/wp-json
My sitename is pensive-goldberg-d19172

Thanks for help.

Hi @firestar300, welcome to the Community!

You are correct, it’s a DNS issue. When you moved your DNS to netlify, you did not recreate your other existing DNS records in your DNS zone (https://app.netlify.com/teams/dennis+a89asas78f9as9p82/dns/camillenivollet.com). You’ll want to go there and create the missing CNAME that points your admin subdomain to your wordpress instance on OVH. Hope that helps.

Thanks a lot for your help Dennis. I fixed that and it works as expected.