Skip to content
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

gatsby build produces different output between ubuntu 22.04 and windows-2022 (on github actions) #38832

Open
2 tasks done
AoSankaku opened this issue Jan 30, 2024 · 0 comments
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@AoSankaku
Copy link

Preliminary Checks

Description

Yesterday I found that the output (=artifact on github actions) produced by running github actions(ubuntu-22.04) and my windows local computer are different. The root page(https://example.com), (root)/index.html, shows the contents written on about.md, which is completely unexpected and not occur on my local environment (not gatsby develop, but gatsby build). This should render contents on index.md on (root)/index.html.

I confirmed like three times that I do not using the wrong or different npm, yarn, and ubuntu version on both computers.

Detailed description is also below. This issue is already solved for me by changing build OS to windows-latest, so this is not a question but dedicated for a bug report.

https://stackoverflow.com/questions/77901772/gatsby-build-produces-different-result-on-github-actions/77908429#77908429

Repository causing the issue

https://github.com/AoSankaku/aosankaku.github.io

You can confirm the issue by cloning and building a website using github actions. Please do not try to make this public because the contents (articles, images) are lisenced under All Right Reserved.

Branch cee5bf44dc3f99a0e8e410d481ed14e0f44daf5c is working fine, and branches until a40ae460e22fa2110f06c184ac8cc6d97a3f8460 is behaving badly.

Artifacts (Outputs)

Artifact that is created by ubuntu-22.04

github-pages.zip

Artifact that is created by windows-latest(windows-2022)

github-pages1.zip

My own gatsby build result (contains some files which is unused in production build)

public.zip

Reproduction Link

https://aosankaku.github.io

Steps to Reproduce

  1. Clone the repo
  2. Set up github actions using yarn build (gatsby build)
  3. Run the workflow
  4. Produces kinda unexpected output (artifact)

Do not use the latest build to reproduce the issue, as this is fixed by using windows-latest instead of ubuntu-22.04.
I'm saying that this is strange that on windows and on ubuntu the gatsby build result must not differ from each other.

Expected Result

Produces the same website (at least the contents and pages on the website!) on both windows and ubuntu environment

Actual Result

The production build on windows and ubuntu are different on index.html.

Environment

Local environment:
System:
    OS: Windows 10 10.0.22621
    CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
  Binaries:
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.4.0 - ~\AppData\Roaming\npm\npm.CMD
  Languages:
    Python: 3.10.11 - /c/Users/abcde/AppData/Local/Microsoft/WindowsApps/python
  Browsers:
    Edge: Chromium (120.0.2210.133)
  npmPackages:
    gatsby: ^5.13.3 => 5.13.3
    gatsby-plugin-alias-imports: ^1.0.5 => 1.0.5
    gatsby-plugin-feed: ^5.0.0-next.4 => 5.13.1
    gatsby-plugin-image: ^3.0.0-next.5 => 3.13.1
    gatsby-plugin-manifest: ^5.0.0-next.4 => 5.13.1
    gatsby-plugin-offline: ^6.0.0-next.4 => 6.13.1
    gatsby-plugin-react-helmet: ^6.0.0-next.2 => 6.13.1
    gatsby-plugin-robots-txt: ^1.8.0 => 1.8.0
    gatsby-plugin-sharp: ^5.0.0-next.5 => 5.13.1
    gatsby-plugin-sitemap: ^6.0.0-next.5 => 6.13.1
    gatsby-plugin-styled-components: ^6.0.0-next.2 => 6.13.1
    gatsby-plugin-typescript: ^5.0.0-next.5 => 5.13.1
    gatsby-plugin-typography: ^5.0.0-next.2 => 5.13.1
    gatsby-remark-copy-linked-files: ^6.0.0-next.2 => 6.13.1
    gatsby-remark-images: ^7.0.0-next.4 => 7.13.1
    gatsby-remark-link-beautify: ^2.2.3 => 2.2.6
    gatsby-remark-vscode: ^3.3.1 => 3.3.1
    gatsby-source-filesystem: ^5.0.0-next.3 => 5.13.1
    gatsby-transformer-remark: ^6.0.0-next.6 => 6.13.1
    gatsby-transformer-sharp: ^5.0.0-next.5 => 5.13.1
  npmGlobalPackages:
    gatsby-cli: 5.5.0

Ubuntu on Github Actions:
Run gatsby info --clipboard
  gatsby info --clipboard
  shell: /usr/bin/bash -e {0}
/home/runner/work/_temp/340e3f90-0aeb-4c29-84dd-9d4fe3f4f9a5.sh: line 1: gatsby: command not found
Error: Process completed with exit code 127.

Config Flags

No response

@AoSankaku AoSankaku added the type: bug An issue or pull request relating to a bug in Gatsby label Jan 30, 2024
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant