cucumber / language-server

Cucumber Language Server
MIT License
35 stars 20 forks source link

cucumber-language-server fails to start up #17

Closed cbochs closed 2 years ago

cbochs commented 2 years ago

Describe the bug

I am attempting to get the language-server setup for use in neovim. However, it fails to start up with the following error.

❯ cucumber-language-server
file:///usr/local/lib/node_modules/@cucumber/language-server/bin/cucumber-language-server.js:2
require('source-map-support').install()
^

ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/usr/local/lib/node_modules/@cucumber/language-server/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at file:///usr/local/lib/node_modules/@cucumber/language-server/bin/cucumber-language-server.js:2:1
    at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

Node.js v17.0.1

This is being run on the (most recent?) released version.

❯ bat package.json | grep version
  "version": "0.3.1",

The package was installed via npm.

❯ npm install -g @cucumber/language-server

To Reproduce Steps to reproduce the behavior:

  1. Run the server (i.e. cucumber-language-server)

Expected behavior The server should start up without errors.

Screenshots N/A

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context N/A

smilovanovic commented 2 years ago

+1 on this, same issue on my end

aslakhellesoy commented 2 years ago

The Cucumber language server isn't really ready for general use yet. There are still some issues to iron out.

I'm probably not going to have much time to work on it for the next few months, but I'd be happy to onboard anybody who's interested in contributing to it.

aslakhellesoy commented 2 years ago

@cbochs @smilovanovic this should be fixed in 0.3.3