Closed simplificate closed 4 years ago
See #7. Waiting a bit before starting the terminal may make the problem go away.
Is startup complete as in
or the extension is still loading?
Also, you may have to save the new file with .r extension first since otherwise VS Code does not know that the file is in R.
@MikhailArkhipov ah, thanks for the pointer to look in the Output for the Startup Log. Here's what it says:
> Checking for .NET Core... OK
> Installing libzip (required for the R process executable)... undefined
I'm going to try to install libzip and see if that helps.
Ok, brew install libzip
appeared to clear the libzip error. I quit and relaunched VSC and saw this:
R Tools Startup Log
> Checking for .NET Core... OK
> Activating R Language Server...
This time, though, the extension told me with a notification it couldn't be started. Here's a new error in the R Tools Output.
R Tools
> [Error - 5:18:45 PM] Starting client failed
> Launching server using command dotnet failed.
Going to google the second line in this log...
I can run dotnet
from the command line. I also installed the .Net Core 2.1 library (I already had 2.2) in case of weird incompatibility. That didn't fix the issue. Am I missing something else?
> $ dotnet --list-runtimes
> Microsoft.AspNetCore.All 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
> Microsoft.AspNetCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
> Microsoft.NETCore.App 2.1.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
> Microsoft.NETCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
As a sanity check, here's R:
> $ r
>
> R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
> Copyright (C) 2018 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> > q()
> $ which r
> /usr/local/bin/r
I saw that Issue #2 was actually cited in the changelog as having to do with libzip. Reading through it, I saw Mikhail recommend checking the Microsoft R Host. I'm not sure if this means anything, but I tried it:
> $ pwd
> /Users/kenwalke/.vscode/extensions/mikhail-arkhipov.r-0.0.5/ls/Host/Mac
> $ ./Microsoft.R.Host
> Segmentation fault: 11
Yep, that is missing libzip. Installing libzip (required for the R process executable)... undefined
means extension attempted to install libzip via brew install libzip
but failed. However, lack of "Installing Homebrew (required to install libzip library)... "
tells that homebrew is installed.
Thank you @MikhailArkhipov. Libzip is successfully installed now, but I can’t make heads or tails of the new error:
> [Error - 5:18:45 PM] Starting client failed
> Launching server using command dotnet failed.
Do you still get > Segmentation fault: 11
?
@MikhailArkhipov yes, same result
vscode-insider solved the problem for mac users
Hi, I am facing the same issue. Are there any updates? I am very new to vscode but is there a way to specify the directory for the libzip library?
Unfortunately it looks like Mikhail has moved on to other projects. This was always meant to be more of a personal project anyway, not a Microsoft-supported extension.
You can try the other R extension for VSCode, which is still actively supported:
https://github.com/Ikuyadeu/vscode-R
It works very well in conjunction with the R LSP client, for tooltip help and language completion features:
Thanks for the reply.
I think that I have found a workaround for MacOS. If you start VS Code via the terminal then "R Tools" seems to work (open -a Visual\ Studio\ Code). This is a workaround I found in the "LaTeX workplace" github, and it has to do with the PATH set by the different ways of launching the app.
I get a new error (see below) but r tools seems to work in the editor itself. Maybe I am wrong.
[Error - 10:39:41 AM] Connection to server is erroring. Shutting down server.
A fatal error occurred, the folder [/usr/local/share/dotnet/host/fxr] does not contain any version-numbered child folders
libzip
dependency removed in 0.0.10
Hi there,
I was kicking the tires on this project and had trouble getting this (and, really, any) R-related extension working on Mac. I found this article on RTVS (from Jan 2018), which said:
I know that this project is derived from RTVS, so I wondered if that was the root cause (although your extension says it supports Mac). I also tried this on two different Macs and got the same result. Here are the steps I took:
Error:
I found this page which suggested running an
npm install
in the extension folder. Here's the path where I found it:/.vscode/extensions/mikhail-arkhipov.r-0.0.5
This didn't help. Here's a dump of what happened:
I have a tech background and have used R Studio, but I'm not an expert in either of these. I'm an analyst and I mostly use VSC for writing SQL for my day job. I also understand this is a volunteer project, so I appreciate the help!
Thanks, Ken