Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Run command in Terminal errors with "Cannot read properties of undefined (reading 'replace')"

未关闭
#1,530 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
r, typescript, vscode
领域
devtools

调研方向

首先,使用列出的 R 命令、r.rpath.mac 设置以及报告的 VS Code 和扩展版本,在 macOS 上复现该故障。跟踪 "R: Run Command in Terminal" 和 "R: Run Command With Editor Path in Terminal" 的命令入口点;当两个命令都能在 R 终端中成功运行代码且不出现错误对话框时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug

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:

  1. Install R via homebrew brew install r
  2. Install R extension from REditorSupport
  3. Open R file
  4. Execute "R: Create R terminal"
  5. 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

主要语言
TypeScript
星标
1.2k
派生
139
平均合并
19 小时 46 分钟
30 天内合并 PR
26

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

REditorSupport/vscode-R 的其他 Issue

查看 REditorSupport/vscode-R 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。