Windows10 git commit报错node: command not found解决办法

realnode.png vps-under-title.png 科学上网教程 | 机场推荐 | 云深不知处(机场)

在使用git准备提交文件时,报错:

Commit failed with error
    0 file committed, 1 file failed to commit: 上传车辆同行记录;
    .git/hooks/pre-commit: line 32: node: command not found

解决办法,在用户目录下,新建.bashrc文件,编辑内容如下:

$ vim ~/.bashrc
# add in .bashrc
PATH=$PATH:/c/Program\ Files\ \(x86\)/nodejs

Reference

  1. https://github.com/observing/pre-commit/issues/139
赞(0)
未经允许禁止转载:优米格 » Windows10 git commit报错node: command not found解决办法

评论 3

  1. #1

    用户目录是哪个目录 啊

    积极努力11个月前 (07-06)回复
    • C:\Users\你的用户名 Windows是这个吧

      巴巴主机11个月前 (07-06)回复
  2. #2

    设置了,还是不行呀

    积极努力11个月前 (07-06)回复

合作&反馈&投稿

商务合作、问题反馈、投稿,欢迎联系

广告合作侵权联系

登录

找回密码

注册

Ads Blocker Image Powered by Code Help Pro

检测到广告已被屏蔽

尊敬的优米格用户,

您好,系统检测到您使用了广告屏蔽组件。本网站并不包含任何侵入性广告,如果本站能给您一点帮助,还请将本站加入拦截白名单,这是我们仅有的收入来源!

网站的持续运作和改进,需要您的慷概帮助,感谢您的支持。

此致,
优米格 团队