question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jsonlite and r.rpath.windows message

See original GitHub issue

Describe the bug A clear and concise description of what the bug is:

“Failed to get list of R functions. Make sure that jsonlite is installed and r.rpath.windows points to a valid R executable.”, and "Command failed: “C:\Program Files\R\R-4.1.2\bin\x64” --silent --no-save --no-restore --slave -f “c:\Users.….vscode\extensions\ikuyadeu.r-2.3.8\R\help\getAliases.R” > “C:\Users.…\AppData\Local\Temp\vscode-R-aliasesa53XJl\aliases.json”.

These messages only appear when hovering or moving the prompt in the editor. jsonlite and r.rpath.windows are correctly installed. R is working correctly, but these messages appear. vs_code_error

To Reproduce Steps to reproduce the behavior:

  1. Go to 'open any R file
  2. Click on ‘prompt of the editor and write commands’
  3. Scroll down to ‘not necessary’
  4. See error --> Describe the bug

Do you want to fix it by yourself? (We hope you help!)

No, I do not know what happens. Because the files these correct install.

(If yes,) what kind of help do you want? (e.g. Which file should I fix, Survey (related documents)

(If related)setting.json

// R.exe path for windows
"r.rterm.windows": "C:\\Program Files\\R\\R-4.1.2\\bin\\x64",

// R path for Mac OS X
"r.rterm.mac": "/usr/local/bin/R",

// R path for Linux
"r.rterm.linux": "/usr/bin/R",

// R command line options (i.e: --vanilla)
"r.rterm.option": [],

// An optional encoding to pass to R when executing the file, i.e. 'source(FILE, encoding=ENCODING)'
"r.source.encoding": "UTF-8",

// Keeping focus when running
"r.source.focus": "editor",

// Use active terminal for all commands, rather than creating a new R terminal
"r.alwaysUseActiveTerminal": false,

// Use bracketed paste mode
"r.bracketedPaste": false,

// Enable R session watcher
"r.sessionWatcher": true,

// Delay in milliseconds before sending each line to rterm (only applies if r.bracketedPaste is false)
"r.rtermSendDelay": 8,

Expected behavior A clear and concise description of what you expected to happen. “The error messages continued. And that’s what happened.”

Screenshots If applicable, add screenshots to help explain your problem. You can show the keyboard contents by pressing F1 and Developer: toggle screencast mode

Environment (please complete the following information):

  • OS: [Windows 11], but happens too in Win10 .
  • VSCode Version: [ 1.64.2 (user setup)]
  • R Version: [ 4.1.2], but it happening after the 4.1.0 installation.
  • vscode-R version: [2.3.8]

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mortuncocommented, Mar 25, 2022

UPDATE:

It my problem is solved. For whoever needs help, let me share what worked for me.

Make general settings to remote development enviroment. (this located at /home/MYUSERNAME/.vscode-server/data/Machine/settings.json)

    "r.bracketedPaste": true,
    "r.sessionWatcher": true,
    "r.alwaysUseActiveTerminal": true,
    "r.lsp.use_stdio": true,
    "r.session.watchGlobalEnvironment": true,
    "r.plot.useHttpgd": true,
    "[r]": {
        "editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?"
    },
    
    "path-autocomplete.pathMappings": {
        "/": "/",
        "./": "${folder}"
    }
}

For different conda environments (or different R versions). As @renkun-ken suggested, use workspace enviromenment setting to isolate. (/path/to/workspace/dir/.vscode/settings.json) Dont forget the distinction between rterm and rpath. rterm is either R or a wrapper (radian). Rpath is our OG R path. (also see https://stackoverflow.com/questions/66830628/configure-r-in-vs-code)

{"r.rterm.linux": "/home/user/anaconda3/envs/myenv/bin/radian",
 "r.rpath.linux": "/home/user/envs/myenv/bin/R"
}

At the moment, my variable explorer, auto-complete (function arguments etc) and plot (httpd) working like a charm.

Good luck!

Best,

Tunc.

0reactions
mortuncocommented, Mar 24, 2022

Alright. I added "r.rterm.linux": "/my/path/to/R". I will re-open if this doesnt solve my problem.

@renkun-ken Thank you very much for fast response.

Best regards,

Tunc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsonlite for R gives error when trying to install - Stack Overflow
I found this was the case for failure when trying to use RMarkdown in RStudio ("upgrade rmarkdown ") for the first time. Installing...
Read more >
Setup Visual Studio Code to run R on VSCode 2021
In this R Programming Tutorial, You'll how to set up / use / run R Code on ... Set up r.rpath.windows, r.rpath.mac, r.rpath.linux:...
Read more >
Visual Studio Code vs R studio vs Github : r/CodingHelp - Reddit
rpath.windows points to valid R executable." where do I install jsonlite? I looked at it through R studio but I am not sure...
Read more >
R Debugger - Visual Studio Marketplace
If your R path is neither in the Windows registry nor the PATH environment variable, make sure to provide a valid path to...
Read more >
Microsoft Open R 4.0.2 - Nextjournal
Setup · -e · install.packages( · c("base64enc", "jsonlite", "devtools", "tidyverse", "foreach", "data.table", · "googleAuthR", "vroom", " ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found