d4rekanguok/gatsby-typescript

gatsby-node createPage - cannot find module

leepowelldev opened this issue · 1 comments

In my gatsby-node.js file I have the following:

result.data.posts.nodes.forEach((node) => {
    createPage({
      path: node.path,
      component: require.resolve('./src/templates/post.tsx'),
      context: {
        uid: node.uid,
      },
    });
  });

Which seems to throw an error whe starting - Cannot find module './src/templates/category.tsx' however the file exists, the app seems to start fine, and the pages are created.

I don't suppose you know of a way to fix this error?

Sorry, my mistake - after lots of looking, was a typo!