errata-ai / vale-action

:octocat: The official GitHub Action for Vale -- install, manage, and run Vale with ease.
MIT License
198 stars 47 forks source link

Vale action not working in GHES #108

Closed vigneshmanick closed 6 months ago

vigneshmanick commented 11 months ago

Hello,

We are using vale in GHES 3.9 and since the past days the action is failing directly on startup. Below the arguments used to run the step and also the stack trace. We had to fix the version of vale action since the higher versions require node20 and this is not currently possible in GHES 3.9

Any ideas what could be the cause?

Thanks!

Run errata-ai/vale-action@7542b61c30b62a100d10d6b132cd02edc2e1c6ec
  with:
    fail_on_error: true
    files: ["docs/userguide"]
    vale_flags: --config=docs/.vale.ini
    reporter: github-check
    version: 2.29.0
    debug: false
    level: error
    filter_mode: added
/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:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/node_modules/undici/index.js:18:54)
vigneshmanick commented 11 months ago

Update I checked what the docker build step is doing and noted the following regarding node, the version is 10 and i suppose the error above is due to the node version for the function not being supported?

Is there a way to force a newer version?

#6 [2/8] RUN apk add --no-cache --update nodejs nodejs-npm git openjdk11 libxslt
  #6 0.202 fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
  #6 0.265 fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz  
  #6 0.569 (12/37) Installing libstdc++ (8.3.0-r0)
  #6 0.581 (13/37) Installing nodejs (10.24.1-r0)
  #6 0.759 (14/37) Installing npm (10.24.1-r0)
dcousineau-godaddy commented 11 months ago

We're also seeing this in GHEC. Given that this action is running from a docker container, I don't believe this issue is related to GHES vs GHEC.

vigneshmanick commented 6 months ago

closing since we have now upgraded to GHES3.11 and the issue is not present anymore