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

SyntaxError: Unexpected identifier for "process" #7

Open
satta opened this issue Nov 13, 2023 · 1 comment · May be fixed by #8
Open

SyntaxError: Unexpected identifier for "process" #7

satta opened this issue Nov 13, 2023 · 1 comment · May be fixed by #8

Comments

@satta
Copy link

satta commented Nov 13, 2023

I recently noticed that my lint runs all fail recently with the following message:

Run max/[email protected]
/usr/bin/docker run --name a070f5450a57735954b9e856e8bab517c956b_47fe83 --label 2a070f --workdir /github/workspace --rm -e "INPUT_FILENAME" -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 "ACTIONS_RESULTS_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/awesome-suricata/awesome-suricata":"/github/workspace" 2a070f:5450a57735954b9e856e8bab517c956b  ""
/usr/local/lib/node_modules/awesome-lint/cli.js:2
import process from 'node:process';
       ^^^^^^^

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    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 Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

For use see https://github.com/satta/awesome-suricata/blob/main/.github/workflows/lint.yml

Unfortunately my JS experience is limited, so I'd appreciate any pointer.

satta added a commit to satta/awesome-lint that referenced this issue Nov 13, 2023
More recent awesome-lint versions will require newer Node versions.
See max#7 for details.
@satta satta linked a pull request Nov 13, 2023 that will close this issue
@satta
Copy link
Author

satta commented Nov 13, 2023

Apparently the npm install step gave valuable insight like:

[Lint Awesome List/Lint] [DEBUG]  Unsupported engine for [email protected]: wanted: {"node":">=12"} (current: {"node":"10.24.1","npm":"6.14.12"})
[Lint Awesome List/Lint] [DEBUG] npm WARN notsup Unsupported engine for @sindresorhus/[email protected]: wanted: {"node":">=14.16"} (current: {"node":"12.22.12","npm":"6.14.16"})

After some iterative updates of the Node container version used, I just bumped to 18 (which is the lowest version currently available on Docker Hub) and that solved the issue.

PR here : #8

MikuAuahDark added a commit to love2d-community/awesome-love2d that referenced this issue Dec 7, 2023
max/awesome-lint uses outdated Node.js to build while the upstream awesome-lint requires newer Node.js. See max/awesome-lint#7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant