Skip to content

It looks like you were trying to add the gatsby-node file? Please rename "gatbsy-node.js" to "gatsby-node.js" #39336

@SRD75

Description

@SRD75

Preliminary Checks

Description

A WordPress/Gatbsy site was working fine.

After updating gatsby-node.js to:

const path = require('path');

exports.createPages = async (actions, graphql) => {
    const pageTemplate = path.resolve("src/templates/page.js");
    const {createPage} = actions;

    const {data} = await graphql(`
        query AllPagesQuery {
            allWpPage {
                databaseId
                blocks
                url
            }
        }`
    );

    for(let i = 0; i < data.allWpPage.nodes.length; i++) {
        const page = data.allWpPage.nodes[i];
        createPage({
            path: page.url,
            component: pageTemplate
        });
    }
}

VS Code has the error:

ERROR #10128 API.CONFIG.LOADING
It looks like you were trying to add the gatsby-node file? Please rename "gatbsy-node.js" to "gatsby-node.js"

Reproduction Link

https://github.com/SRD75/gutenberg-gatsby

Steps to Reproduce

  1. Run gatsby develop

Expected Result

The VS Code command gatsby develop to run without error.

Actual Result

VS Code error:

ERROR #10128 API.CONFIG.LOADING

It looks like you were trying to add the gatsby-node file? Please rename "gatbsy-node.js" to "gatsby-node.js"

Environment

System:
    OS: macOS 15.5
    CPU: (10) arm64 Apple M4
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.17.1 - /usr/local/bin/node
    npm: 10.9.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 138.0.7204.169
    Safari: 18.5
  npmPackages:
    gatsby: ^5.3.3 => 5.3.3
    gatsby-plugin-apollo: ^4.0.3 => 4.0.3
    gatsby-plugin-image: ^3.3.2 => 3.3.2
    gatsby-plugin-manifest: ^5.3.1 => 5.3.1
    gatsby-plugin-postcss: ^6.3.0 => 6.3.0
    gatsby-plugin-react-helmet: ^6.3.0 => 6.3.0
    gatsby-plugin-sharp: ^5.3.2 => 5.3.2
    gatsby-source-filesystem: ^5.3.1 => 5.14.0
    gatsby-source-graphql: ^5.3.1 => 5.3.1
    gatsby-source-wordpress: ^7.15.0 => 7.15.0
    gatsby-transformer-sharp: ^5.3.1 => 5.3.1
  npmGlobalPackages:
    gatsby-cli: 5.14.0

Config Flags

require("dotenv").config({
path: ".env",
});

/**

  • @type {import('gatsby').GatsbyConfig}
    */
    module.exports = {
    siteMetadata: {
    title: The Gatsby Garage,
    siteUrl: http://gutenberg-gatsby.local,
    },
    plugins: [
    {
    resolve: "gatsby-plugin-apollo",
    options: {
    uri: process.env.WPGRAPHQL_URL,
    },
    },
    "gatsby-plugin-react-helmet",
    "gatsby-plugin-postcss",
    gatsby-transformer-sharp, // Needed for dynamic images,
    gatsby-plugin-sharp,
    gatsby-plugin-image,
    {
    resolve: gatsby-source-wordpress,
    options: {
    url: process.env.WPGRAPHQL_URL,
    },
    },
    {
    resolve: "gatsby-plugin-manifest",
    options: {
    icon: "static/favicon.png",
    },
    },
    ],
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: triage neededIssue or pull request that need to be triaged and assigned to a reviewertype: bugAn issue or pull request relating to a bug in Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions