Skip to content

馃悰 Bug: Yarn 4 build does not generate sitemap.xml and robots.txt聽#2517

Description

@bhushan4work

Describe the bug

describe the bug

the production build uses yarn 4, but sitemap generation is configured
as a postbuild script.

yarn 4 does not execute arbitrary post<user-script> hooks, so
next-sitemap is not run after yarn build.

as a result, the deployed site is missing its generated sitemap.

actual behavior

sitemap.xml is not generated and https://json-schema.org/sitemap.xml
returns 404.

possible fix

invoke next-sitemap explicitly as part of the build command or as an
explicit ci/deployment step.

Steps To Reproduce

  1. run corepack enable
  2. run yarn install
  3. run yarn build
  4. inspect the out directory
  5. visit https://json-schema.org/sitemap.xml

Expected Behavior

the production build should generate sitemap.xml and the corresponding
robots configuration.

Screenshots

No response

Device Information [optional]

- OS:
- Browser:
- version:

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is the initial status for an issue that requires triage.馃悰 BugIndicates that the issue is a bug or defect.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions