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

Cannot find bin stimulus-language-server after npm install #287

Closed
ttilberg opened this issue May 21, 2024 · 4 comments
Closed

Cannot find bin stimulus-language-server after npm install #287

ttilberg opened this issue May 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ttilberg
Copy link

Following instructions from https://github.com/marcoroth/stimulus-lsp/tree/main/server#stimulus-language-server, I am unable to find the bin referenced in running stimulus-language-server.

I can see that a bin entry exists in package.json, but the output directory does not include a bin stub:

~
▶ npm install -g stimulus-language-server

added 89 packages in 6s

21 packages are looking for funding
  run `npm fund` for details
Reshimming asdf nodejs...

~
▶ stimulus-language-server --stdio
zsh: command not found: stimulus-language-server

~cd $(npm ls -g | head -n 1)

nodejs/18.18.0/lib  v0.13.1 ✗
▶ cd node_modules/stimulus-language-server

lib/node_modules/stimulus-language-server  v0.13.1 ✗
▶ ls
README.md     node_modules/ out/          package.json

lib/node_modules/stimulus-language-server  v0.13.1 ✗
▶ cd out

node_modules/stimulus-language-server/out  v0.13.1 ✗
▶ ls
action_descriptor.js      code_lens.js.map          definitions.js.map        events.js                 levenshtein.js.map        server.js.map             utils.js
action_descriptor.js.map  commands.js               diagnostics.js            events.js.map             requests/                 service.js                utils.js.map
code_actions.js           commands.js.map           diagnostics.js.map        html_util.js              requests.js               service.js.map
code_actions.js.map       data_providers/           document_service.js       html_util.js.map          requests.js.map           settings.js
code_lens.js              definitions.js            document_service.js.map   levenshtein.js            server.js                 settings.js.map

I see there's a file in the repo scripts/executable.mjs that appears to have the task of generating the binstub, but it seems to not be doing its job. I'm not fluent enough in the js ecosystem to debug further.

Macos 14.2.1
Node 18.18.0 with npm 9.8.1
Node 22.2.0 with npm 10.7.0
asdf nodejs plugin

Additionally I tried this from two different laptops.

@marcoroth
Copy link
Owner

Hey @ttilberg, thanks for opening this issue!

I think you are right, it seems like the stimulus-language-server executable which is supposed to be in out/ is not actually shipped with the npm package.

I'll check if my release GitHub Action is missing something!

This might also explain the behavior @kcdragon has been seeing in #20 (comment)

@marcoroth marcoroth added the bug Something isn't working label May 22, 2024
@marcoroth
Copy link
Owner

I just published v1.0.2 which now includes the executable. If you get a chance @ttilberg, can you try that version? Thank you!

@ttilberg
Copy link
Author

Success! Sublime is now cooking with the LSP.

Thanks!

@marcoroth
Copy link
Owner

Awesome, thanks for reporting back! I'm going to close this then 🙌🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants