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

npm run docs:build -> [vitepress] spawn git EAGAIN #4008

Closed
4 tasks done
C-L-STARK opened this issue Jul 1, 2024 · 10 comments
Closed
4 tasks done

npm run docs:build -> [vitepress] spawn git EAGAIN #4008

C-L-STARK opened this issue Jul 1, 2024 · 10 comments
Labels
need more info Further information is requested

Comments

@C-L-STARK
Copy link

Describe the bug

➜  npm run docs:build

> docs:build
> vitepress build .


  vitepress v1.2.3

x Build failed in 20.52s
✖ building client + server bundles...
build error:
[vitepress] spawn git EAGAIN
file: xx/xx/docs/software/windows/navicat-charts-viewer-win.md
[vitepress] spawn git EAGAIN
file: xx/xx/docs/software/windows/navicat-charts-viewer-win.md
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Reproduction

Expected behavior

System Info

System:
    OS: macOS 12.7.5
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 169.53 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.20.3 - ~/.nvm/versions/node/v18.20.3/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v18.20.3/bin/npm
    pnpm: 9.1.4 - ~/Library/pnpm/pnpm
    bun: 1.1.12 - /usr/local/bin/bun
  Browsers:
    Chrome: 126.0.6478.127
    Safari: 17.5
  npmPackages:
    vitepress: ^1.2.3 => 1.2.3

Additional context

Validations

@C-L-STARK C-L-STARK added the bug: pending triage Maybe a bug, waiting for confirmation label Jul 1, 2024
@brc-dd
Copy link
Member

brc-dd commented Jul 1, 2024

Please provide minimal reproducible example and output of git --version. You need git installed if you're using lastUpdated. You can install it by running xcode-select --install

@brc-dd brc-dd added need more info Further information is requested and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jul 1, 2024
@C-L-STARK
Copy link
Author

git version 2.44.0

@C-L-STARK
Copy link
Author

i don't think it was caused by git;

...

@brc-dd
Copy link
Member

brc-dd commented Jul 2, 2024

are you able to run this command from where you're running docs:build:

git log -1 --pretty="%ai" path/to/your/navicat-charts-viewer-win.md

@C-L-STARK
Copy link
Author

C-L-STARK commented Jul 2, 2024

i can't do git log -1 --pretty="%ai" - - any other way?
image

its a dynamic generate page;

will generate about more than 2000 pages.

when i only generate a little percent, it work fine. but when generate 2000 pages... [vitepress] spawn git EAGAIN

@C-L-STARK
Copy link
Author

[pkg].md

---
layout: doc
---

<script setup>
import { useData } from 'vitepress'
import { onMounted } from 'vue'

const { params } = useData()

onMounted(() => {
    document.title = params.value.title + ' For Windows'
})

</script>

<h1>{{ $params.title }} For Windows</h1>

::: info
{{ $params.lu }}[our mail](mailto:xxx@gmail.com)
:::

download URL:
<a v-for="dl in $params.download" :href="dl.url" style="margin-left: 20px;" target="_blank">
    {{ dl.type === 'bdp' ? 'A' : 'B' }}
</a>

PWD:
<span v-for="dl in $params.download" style="margin-left: 20px;">
    {{ dl.type === 'bdp' ? 'A(' + dl.pwd + ')' : 'B(' + dl.pwd + ')' }}
</span>

<!-- @content -->

[pkg].path.hs

export default {
  paths() {
    return [{"params":{"pkg":"zettlr-win","title":"Free xxx","lu":"2024-06-12 18:02","download":[{"type":"bdp","url":"https://xxx","pwd":"95a"},{"type":"quk","url":"https://xxx","pwd":"Uxm"}]}, ... ]

@brc-dd brc-dd closed this as completed in 387acf7 Jul 2, 2024
@brc-dd
Copy link
Member

brc-dd commented Jul 2, 2024

I've pushed a fix, but I'm not sure if it will work. You can try building vitepress locally and using it or maybe wait for next release and give it a try.

@brc-dd
Copy link
Member

brc-dd commented Jul 4, 2024

Seems like you're trying to use clean urls (urls without .html) but haven't set cleanUrls: true in your config. Nor your server is handling that properly. It's returning 404 without .html. Where/how have you hosted your site?

@C-L-STARK
Copy link
Author

vercal ~

ok,i'll set this prop and have a try. very thanks.

@brc-dd
Copy link
Member

brc-dd commented Jul 5, 2024

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants