-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Closed
Labels
status: triage neededIssue or pull request that need to be triaged and assigned to a reviewerIssue or pull request that need to be triaged and assigned to a reviewertype: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby
Description
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
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
- 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
Labels
status: triage neededIssue or pull request that need to be triaged and assigned to a reviewerIssue or pull request that need to be triaged and assigned to a reviewertype: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby