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

Fix Language Server and Tools --version command #853

Merged
merged 9 commits into from
Dec 18, 2023

Conversation

aspeddro
Copy link
Contributor

➜ npm i -g @rescript/language-server

added 22 packages in 2s

2 packages are looking for funding
  run `npm fund` for details

~ took 2s
➜ rescript-language-server -v
node:internal/fs/utils:350
    throw err;
    ^

Error: ENOENT: no such file or directory, open './package.json'
    at Object.openSync (node:fs:603:3)
    at Object.readFileSync (node:fs:471:35)
    at /home/pedro/.local/share/fnm/node-versions/v18.18.2/installation/lib/node_modules/@rescript/language-server/out/cli.js:28:49
    at Object.<anonymous> (/home/pedro/.local/share/fnm/node-versions/v18.18.2/installation/lib/node_modules/@rescript/language-server/out/cli.js:38:3)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: './package.json'
}

Node.js v18.18.2

Now:

rescript-language-server -v
1.26.0

@aspeddro aspeddro marked this pull request as draft November 16, 2023 17:09
@aspeddro aspeddro changed the title fix(lsp): cli version Fix Language Server and Tools --version command Nov 17, 2023
@aspeddro aspeddro marked this pull request as ready for review November 17, 2023 21:13
@zth
Copy link
Collaborator

zth commented Dec 6, 2023

Is it safe to mix imports and requires like this?

@aspeddro
Copy link
Contributor Author

I don't really know haha, but I moved it to commonjs

@zth
Copy link
Collaborator

zth commented Dec 18, 2023

@aspeddro rebase? Then ready to go!

@zth zth merged commit e54c067 into rescript-lang:master Dec 18, 2023
zth added a commit that referenced this pull request Dec 18, 2023
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 this pull request may close these issues.

2 participants