lukka / run-vcpkg

The GitHub Action to setup vcpkg for your C++ based projects. Stores built ports using Binary Caching backed onto GH Cache.
MIT License
195 stars 26 forks source link

Meet an error when try to use this action. #230

Closed wuye9036 closed 6 months ago

wuye9036 commented 6 months ago

On gitea with default action runner, I have met an error:

      this._parser?.end()
                   ^
SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:[2](<my_repo>/actions/runs/23#jobstep-4-2)7)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:86[3](<my_repo>//actions/runs/23#jobstep-4-3):32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:1[4](<my_repo>/actions/runs/23#jobstep-4-4))
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:[6](<my_repo>/actions/runs/23#jobstep-4-6)0:12)
    at internal/main/run_main_module.js:17:47

The nodejs in the docker which runs the job is ubuntu 22.04 with apt installed version.

lukka commented 6 months ago

@wuye9036 with the given data, looks like the error is not related to run-vcpkg (which did not change since long time). Do you have more data like the log with runner and action debug verbose logging? https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging

wuye9036 commented 6 months ago

@wuye9036 with the given data, looks like the error is not related to run-vcpkg (which did not change since long time). Do you have more data like the log with runner and action debug verbose logging? https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging

The script uses the language feature "optional chaining" which is supported by node.js v14 and later. But the default apt source in ubuntu 22.04 just provides node.js v12. I have upgraded the node.js by official installer and this issue is resolved.