mac: vscode插件Code Runner报错:/bin/sh: node: command not found

2年前 (2022) 程序员胖胖胖虎阿
423 0 0

在vscode中使用插件Code Runner时报错,导致无法运行:/bin/sh: node: command not found

原因:没有找到node

解决方法:

  • 在终端中输入【which node】,找到node可执行文件的路径;
    mac: vscode插件Code Runner报错:/bin/sh: node: command not found
  • 修改vscode设置
    mac: vscode插件Code Runner报错:/bin/sh: node: command not found
  • 输入Executor Map,然后再settings.json中编辑;
    mac: vscode插件Code Runner报错:/bin/sh: node: command not found
  • 把node可执行文件的路径替换到这里;
    mac: vscode插件Code Runner报错:/bin/sh: node: command not found
  • 完成,可以舒畅的运行了~

相关文章

暂无评论

暂无评论...