REditorSupport / REditorSupport/vscode-R
Run command in Terminal errors with "Cannot read properties of undefined (reading 'replace')"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
Describe the bug
Unable to run any code / file in R terminal.
Always getting an error dialog:
Command 'R: Run Command in Terminal' resulted in an error
Cannot read properties of undefined (reading 'split')
or when executing "R: Run command with editor path in terminal"
** Command 'R: Run Command With Editor Path in Terminal' resulted in an error**
Cannot read properties of undefined (reading 'replace')
To Reproduce
Steps to reproduce the behavior:
- Install R via homebrew
brew install r - Install R extension from REditorSupport
- Open R file
- Execute "R: Create R terminal"
- Execute "R: Run command in terminal"
Can you fix this issue by yourself? (We appreciate the help)
No
setting.json
// R path for Mac OS X
"r.rpath.mac": "/opt/homebrew/bin/R",
Expected behavior
Program is run in R terminal.
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: macOS 14.4
- VSCode Version: 1.89.1
- R Version: 4.4.0
- vscode-R version: 2.8.4
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure on macOS using the listed R commands, the r.rpath.mac setting, and the reported VS Code and extension versions. Trace the command entry points for "R: Run Command in Terminal" and "R: Run Command With Editor Path in Terminal"; done means both commands run code successfully in the R terminal without an error dialog.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100