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

Error trying to use with coc-reason #422

Open
octavz opened this issue Mar 12, 2020 · 8 comments
Open

Error trying to use with coc-reason #422

octavz opened this issue Mar 12, 2020 · 8 comments

Comments

@octavz
Copy link

octavz commented Mar 12, 2020

I am on neovim, ubuntu 19.10,
NVIM v0.5.0-384-ga2efc9cf8

Coc works find for other language servers.

I tried to install manually or with :CocInstall coc-reason

I keep getting:

[Error  - 5:11:45 PM] Request textDocument/documentHighlight failed.
  Message: /home/user/projectXXX/node_modules/bs-platform/lib/bsb.exe not found. aborting
  Code: -32603 
@sandal-tan
Copy link

sandal-tan commented Mar 13, 2020

OS X 10.15.3
NVIM v0.5.0-f8f41d0

I've run into this too. I can get around that particular message by changing into node_modules/bs-platform and then running cp darwin/* lib/, which for you would be cp linux/* lib/.

However, this only leads to another problem:

 [reason] [E] /Users/iantbaldwin/development/tic_tac_toe/node_modules/bs-
 platform/lib/bsc.exe: unknown option '-bs-no-builtin-ppx-ml'.
 Usage: bsc <options> <files>
 Options are:
 -bs-super-errors  Better error message combined with other tools
 -bs-re-out  Print compiler output in Reason syntax
 -bs-jsx  Set jsx version
 -bs-refmt  Set customized refmt path

I was able to resolve all of the above issues by setting my version of bs-platform to 7.1.1.

@octavz
Copy link
Author

octavz commented Mar 14, 2020

@sandal-tan I am already on 7.2.2, after copying binaries i get the second error indeed but I am already on 7.2.2 which looks it has that flag but still it shows the error above.

@octavz
Copy link
Author

octavz commented Mar 15, 2020

installing stuff manually works, it seems coc-vim is not updating correctly the binary

@sandal-tan
Copy link

@octavz I don't believe coc-reason is responsible for install bings-platform, which is the source of this error.

I manually installed bs-platform globally with: $ yarn global add [email protected]
In relevant projects, I edit packages.json and make sure that "bs-platform": "7.1.1" is in the devDependencies section.

With those two pinned to 7.1.1 I am not running into any issues.

@dfalling
Copy link

MacOS 10.15.3
NVIM v0.3.8

@octavz What's the manual install that you're doing to fix this? This broke for me also when I moved to 7.2.2. I have bs-platform installed locally, but there is no bsb.exe at bs-platform/lib. It's in bs-platform/darwin.

@dfalling
Copy link

I was able to fix autoformatting of files by running cp -r node_modules/bs-platform/darwin/* node_modules/bs-platform/lib. I still get a failure on the first line of every Reason file though:

src/App.re|1 col 1 error| [reason] .../node_modules/bs-platform/lib/bsc.exe: unknown option '-bs-no-builtin-ppx-ml'. [E]

@dfalling
Copy link

I figured this out for both of my errors. I had previously configured COC to use a language server for Reason. This is actually the part that was getting an outdated version of bs-platform and spitting out the error.

@mishaszu
Copy link

mishaszu commented May 27, 2020

I have exact same problem with Ubuntu on bs-platform 7.2 & 7.3. For 7.1 seems rls works but I still have manually link bsb.exe to fix:node_modules/bs-platform/lib/bsb.exe not found. aborting.
cp -r node_modules/bs-platform/darwin/* node_modules/bs-platform/lib doesn't work for me.

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

No branches or pull requests

4 participants