Skip to content

Unexpected error while calling npm-groovy-lint #261

@lewisohn

Description

@lewisohn

Not sure if this is an error or if I just don't know how to configure the extension properly.

I'm running VS Code 1.92.2 on Windows 11 version 10.0.26100 with version 3.3.1 of the Groovy Lint, Format and Fix extension (nicolasvuillamy.vscode-groovy-lint). I've added C:\Program Files\nodejs to Windows' Path environment variable. node -v returns v22.14.0 and npm -v returns 10.9.2.

npm-groovy-lint -v returns the following:

GroovyLint: Successfully processed CodeNarc: 
CodeNarc version 3.3.0
npm-groovy-lint version 15.1.0

Embeds:
CodeNarc version 3.3.0
- Groovy version 3.0.9 (superlite)

java -version returns the following:

java version "24" 2025-03-18
Java(TM) SE Runtime Environment (build 24+36-3646)
Java HotSpot(TM) 64-Bit Server VM (build 24+36-3646, mixed mode, sharing)

I've restarted VS Code multiple times.

I have a .groovy file open. Every so often, I get an error in VS Code: "There has been an unexpected error while calling npm-groovy-lint. Please join the end of the logs in Output/GroovyLint if you report the issue"

Image

To clarify, this error pops up periodically, even when I'm not actively modifying my open .groovy file. When I invoke the Format Document command in VS Code, it takes a very long time for anything to happen at all before erroring. This log is from a manually invoked format command: GroovyLint.log

I'm using the recommended .groovylintrc.json configuration file.

I've tried installing npm-groovy-lint both with and without the global flag -g, but it made no difference.

I'm not able to upload my .groovy file but I can share that it's only 29 lines and 1 KB.

I notice there are other issues (93, 108) that mention the same error message, but they were supposedly fixed in newer versions of the extension, so I don't think the underlying cause is the same. I have the telemetry setting disabled, for what it's worth.

Thanks if you can help!

Activity

github-actions

github-actions commented on May 3, 2025

@github-actions

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.

verovit

verovit commented on May 9, 2025

@verovit

I have the same issus, I've been having it since I removed my old java jdk installations and updated to java 21.

Axel2293

Axel2293 commented on May 15, 2025

@Axel2293

Same issue with me.

github-actions

github-actions commented on Jun 15, 2025

@github-actions

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lewisohn@verovit@Axel2293

        Issue actions

          Unexpected error while calling npm-groovy-lint · Issue #261 · nvuillam/vscode-groovy-lint