专业的编程技术博客社区

网站首页 > 博客文章 正文

SourceTree提交代码失败env:node:No such file or directory

baijin 2024-11-24 11:51:11 博客文章 3 ℃ 0 评论

记一次在Mac上sourceTree提交代码失败的处理过程

问题描述

使用git precommit 检查代码规范的情况下,使用sourcetree提交代码报错, env: node: No such file or directory

解决办法

如果使用的是Mac, 运行如下命令启动sourceTree

$ open /Applications/SourceTree.app/Contents/MacOS/SourceTree

扩展

命令很长,不容易记住,设置terminal启动别名

找到.bash_profile文件(文件在User/username文件夹下)

$ open .bash_profile

添加命令别名(需要注意:别名添加完成后重启电脑生效,因为 .bash_profile是登录时候才读取的 )

重启之后,terminal中输入

$ openst 即可打开sourceTree

点关注不迷路勺子带你学技术!哈哈!

Tags:

猜你喜欢

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表