Open uchiha-vivek opened 4 days ago
gatsby-node.esm.js
import jobs from "./src/jobs"; import path from "path";
export const createPages = async ({ graphql, actions }) => { const { createPage } = actions; jobs.map((job) => createPage({ path: job/${job.id}, component: path.resolve('./src/pages/job.jsx'), context: { job } }) ); }
job/${job.id}
Sir in the above code : import jobs from "./src/jobs" is incorrect , i think it should be ./src/ pages/job
Please check it once !
Why, is there a problem with the current build?
gatsby-node.esm.js
import jobs from "./src/jobs"; import path from "path";
export const createPages = async ({ graphql, actions }) => { const { createPage } = actions; jobs.map((job) => createPage({ path:
job/${job.id}
, component: path.resolve('./src/pages/job.jsx'), context: { job } }) ); }Sir in the above code : import jobs from "./src/jobs" is incorrect , i think it should be ./src/ pages/job
Please check it once !