-
-
Notifications
You must be signed in to change notification settings - Fork 116
Support latest LTS node@18 or latest node #334
Comments
I encountered the same problem, trying to get Grammarly working with Neovim using Mason and Node v18. Downgrading to Node v16 with nvm got rid of the Node v18 is the current LTS version as of 2022-10-25, so I think more people will run into this problem. Upgrading would resolve Need help configuring the language server with neovim (the most upvoted discussion in this repo) and close #336 🙂 |
I contributed a homebrew formula for |
That's weird. I'm on node 16 and still I see the same issue. |
Can you be sure that the Neovim really uses node16 to launch grammarly-languageserver? I encounter situations where Neovim does not uses the node in my shell environment. |
Sure, here is the error log:
|
@gcstr Sorry, I have no idea then. |
@gcstr If you scroll to the far right of your log you can see that Node v.19.4.0 is being used 👇
|
I just found out that if I omit the
I say it's weird because I don't have node v19.04 installed. I removed all node versions, installed |
Hack till this issue is solved in your First install Node v16: nvm install v16.14.0 Add the following to your shell configuration: function nvim2() {
export NVIM_BIN=$(which nvim)
export NODE_CURRENT=$(node -v)
nvm use v16.14.0
$NVIM_BIN $@
nvm use $NODE_CURRENT
} Then execute nvim2 README.md Will be a little bit slow at first. But eh! This issue is also temporary. Delete the above function later on once this issue is solved |
For me, I used First, download (not install) NodeJS v16. n -d 16 Second, set require("lspconfig").grammarly.setup {
cmd = { "n", "run", "16", "path/to/grammarly-languageserver", "--stdio" },
}
And now test it with random markdown file. nvim README.md |
I can confirm the bug. Changing the extension of the file to something else like |
Similarly, for those of us that use
And make it executable. Then the command to call Grammarly would be: |
The current implementation requires
node@16
: https://github.com/znck/grammarly/blob/main/package.json#L4When starting
grammarly-languageserver
withnode@18
ornode@19
, there appears a runtime error if it is attached to amarkdown
file:It seems to be breaking change in
node@18
related to URL.Is it possible that
grammarly
gets updated an support the latest node?This issue originated from Homebrew/homebrew-core#118003, which patches the
grammarly-languageserver
formula by sticking tonode@16
and avoids this issue temporarily.The text was updated successfully, but these errors were encountered: