Skip to content

Can't launch/debug *.cjs files #958

@AndrewFerr

Description

@AndrewFerr

Trying to launch a *.cjs file hangs indefinitely, and trying to debug it fails with this error:

Unexpected exception
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Cannot launch program '{path}'; configuring source maps might help.

That comment about source maps suggests that WWD/lsp4j doesn't realize that *.cjs files are CommonJS modules, which are just JavaScript files with a specific module system, and thus don't need source maps.

A workaround is to simply rename a *.cjs file to *.js, which also proves that there isn't anything inherent about *.cjs files that WWD can't handle.

Maybe this is a lsp4j issue, but the fact that WWD can't even run a *.cjs file at all seems unrelated to language servers, so I filed it here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions