fifsky / html-to-pdf-action

HTML to PDF for github actions
MIT License
27 stars 15 forks source link

globalThis is not defined #9

Open gcsfred2 opened 1 year ago

gcsfred2 commented 1 year ago

Any ideas?

Run fifsky/html-to-pdf-action@master
  with:
    htmlFile: doc/readme_.html
    outputFile: doc/README_.pdf
    pdfOptions: {"format": "A4", "margin": {"top": "10mm", "left": "10mm", "right": "10mm", "bottom": "10mm"}}
  env:
    REGISTRY: ghcr.io
    IMAGE_NAME: LevDavidovich/Gorki-Vladimir
/usr/bin/docker run --name b189c8391bbf[2](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:2)418f89[3](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:3)f86a[4](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:4)c300e488_4b9[5](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:5)28 --label 94351b --workdir /github/workspace --rm -e "REGISTRY" -e "IMAGE_NAME" -e "INPUT_HTMLFILE" -e "INPUT_OUTPUTFILE" -e "INPUT_PDFOPTIONS" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/Gorki-Vladimir/Gorki-Vladimir":"/github/workspace" 94351b:189c8391bbf2418f893f8[6](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:6)a4c300e488
/node_modules/undici/lib/global.js:26
  return globalThis[globalDispatcher]
  ^

ReferenceError: globalThis is not defined
    at getGlobalDispatcher (/node_modules/undici/lib/global.js:26:3)
    at Object.<anonymous> (/node_modules/undici/lib/global.js:9:5)
    at Module._compile (internal/modules/cjs/loader.js:[7](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:7)01:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:1[8](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:8))
    at Object.<anonymous> (/node_modules/undici/index.js:[18](https://github.com/LevDavidovich/Gorki-Vladimir/actions/runs/6494971829/job/17638975645#step:6:19):54)
sbhattacharjee91 commented 1 year ago

I am facing the same issue

alexcom commented 1 year ago

Same issue here. Nothing changed on my side.

marcossilvestrini commented 11 months ago

Same issue here. Nothing changed on my side.

udondan commented 11 months ago

You could try with my old fork until it is fixed. It is not updated automatically so it should still be working.

udondan/html-to-pdf-action@master

fifsky commented 11 months ago

fixed

fifsky commented 11 months ago

I updated the dependency rules for the node version to avoid automatic update compatibility issues