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

Language Server crashed immediately #10

Open
dylanirlbeck opened this issue Aug 29, 2020 · 1 comment
Open

Language Server crashed immediately #10

dylanirlbeck opened this issue Aug 29, 2020 · 1 comment

Comments

@dylanirlbeck
Copy link

Hi all. I'm trying to integrate hoon-language-server with hoon.vim per the instructions in the README. However, I get the following error when I run hoon-language-server from the command line:

❯ hoon-language-server
internal/modules/cjs/loader.js:955
  throw err;
  ^

Error: Cannot find module '../out/server.js'
Require stack:
- /usr/local/lib/node_modules/hoon-language-server/bin/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
    at Function.Module._load (internal/modules/cjs/loader.js:835:27)
    at Module.require (internal/modules/cjs/loader.js:1012:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/hoon-language-server/bin/index.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:1123:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:972:32)
    at Function.Module._load (internal/modules/cjs/loader.js:872:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/local/lib/node_modules/hoon-language-server/bin/index.js' ]
}

Is there something I'm missing? I ran it manually because in Vim (or Neovim, in my case) the language server kept crashing when I'd open a Hoon file.

Thanks so much!

@dylanirlbeck
Copy link
Author

EDIT: Running tsc to compile the project inside the directory where the global NPM module was installed solved the issue. I'm not sure why the project isn't compiled during postinstall, but I'll look into it to see if I can open a PR.

I'll leave this issue open for now since I think it causes unnecessary friction for LSP consumers.

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