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

Error running npm-groovy-lint in Docker container: GroovyLint: Unable to start CodeNarc Server. #370

Closed
CliveUnger opened this issue Apr 17, 2024 · 2 comments

Comments

@CliveUnger
Copy link

I am trying to run npm-groovy-lint as a Docker container in a GitLab CI pipeline (similar to CircleCI). My CI config looks something like:

groovy_lint:
  stage: lint
  image: 
    name: nvuillam/npm-groovy-lint
    entrypoint: 
      - /bin/bash
  script:
    - node -v
    - java --version
    - npm-groovy-lint --version
    - npm-groovy-lint --noserver --config ".groovylintrc.json" --failon warning --verbose

However, it fails with the following error:

$ node -v
v18.19.1
$ java --version
openjdk 17.0.10 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-alpine-r0)
OpenJDK 64-Bit Server VM (build 17.0.10+7-alpine-r0, mixed mode, sharing)
$ npm-groovy-lint --version
GroovyLint: Unable to start CodeNarc Server. Use --noserver if you do not even want to try
GroovyLint: Successfully processed CodeNarc: 
npm-groovy-lint version 14.4.0
Embeds:
Error collecting CodeNarc version
- Groovy version 3.0.9 (superlite)
$ npm-groovy-lint --noserver --config ".groovylintrc.json" --failon warning --verbose
Unable to use CodeNarc JSON result
undefined
Unexpected error: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at processOutput (/usr/local/lib/node_modules/npm-groovy-lint/lib/output.js:109:37)
    at NpmGroovyLint.postProcess (/usr/local/lib/node_modules/npm-groovy-lint/lib/groovy-lint.js:335:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NpmGroovyLint.run (/usr/local/lib/node_modules/npm-groovy-lint/lib/groovy-lint.js: f69:13)
    at async /usr/local/lib/node_modules/npm-groovy-lint/lib/index.js:12:9

I tried different permutations of the command: no flags, different path, different entry point, different image version, but it was always the same issue with CodeNarc unable to start. Any guidance on this would be greatly appreciated.

@nvuillam
Copy link
Owner

nvuillam commented May 8, 2024

@CliveUnger please can you test with latest version ?

Copy link

github-actions bot commented Jun 8, 2024

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants