Skip to content

fix: skip page creation for missing component files #6512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 30, 2025

Conversation

vishalvivekm
Copy link
Contributor

@vishalvivekm vishalvivekm commented May 30, 2025

Description
during build right now:

Error creating page for /projects/sistent/components/icons/code: Error: Cannot find module './src/sections/Projects/Sistent/components/icons/code.js'
Require stack:
- /Users/l/code/layer5/gatsby-node.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Function.resolve (node:internal/modules/helpers:190:19)
    at /Users/l/code/layer5/gatsby-node.js:805:32
    at Array.forEach (<anonymous>)
    at /Users/l/code/layer5/gatsby-node.js:799:17
    at Array.forEach (<anonymous>)
    at createComponentPages (/Users/l/code/layer5/gatsby-node.js:798:16)
    at exports.createPages (/Users/l/code/layer5/gatsby-node.js:814:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runAPI (/Users/l/code/layer5/node_modules/gatsby/dist/utils/api-runner-node.js:436:16) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/l/code/layer5/gatsby-node.js' ]
}

It's because of the absence of guidance and code example files for icons components.

This PR skips page creation for missing component files, and doesn't log an error.
image

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Vivek Vishal <vishalvivek488@gmail.com>
@vishalvivekm vishalvivekm changed the title Update gatsby-node.js fix: skip page creation for missing component files May 30, 2025
Signed-off-by: Vivek Vishal <vishalvivek488@gmail.com>
Signed-off-by: Vivek Vishal <vishalvivek488@gmail.com>
Signed-off-by: Vivek Vishal <vishalvivek488@gmail.com>
@l5io
Copy link
Contributor

l5io commented May 30, 2025

🚀 Preview for commit 2e1005d at: https://6839fb08572570bebb286201--layer5.netlify.app

@vishalvivekm vishalvivekm merged commit ea534d8 into master May 30, 2025
5 checks passed
@vishalvivekm vishalvivekm deleted the vishalvivekm-patch-3 branch May 30, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants