node.js - git提交时报错
怪我咯
怪我咯 2017-04-17 15:17:17
0
3
517

今天git工程出现的了一个问题
同步是没有问题的
不能提交
改动任何东西 提交就汇报下面这个错

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree commit -q -F /var/folders/tx/sdwvc7x5055034ntbz2mxyxh0000gn/T/SourceTreeTemp.y41tmH 
env: node: No such file or directory
Completed with errors, see above


请问这是什么情况?
env: node:是什么东西呢??
这与我加了.eslint文件有关吗???

谢谢!!!!!!

PS:
切换分支页会报错

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree checkout master 
Switched to branch 'master'
env: node: No such file or directory
Your branch is up-to-date with 'origin/master'.
Completed with errors, see above
怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
小葫芦

Have you tried git status to see what changes have affected it

黄舟

Reference URL, I don’t know if it will be useful to you
https://answers.atlassian.com...

大家讲道理

Based on your situation, make a bold guess.

Since you said, there will be problems when commit and checkout are used, git status is fine. The wrong part is env node. So, there are two possibilities:

  1. The hook triggered during commit cannot find the node running environment

  2. In my impression, eslint depends on node, so if the node cannot be found, this error may also be reported

The first situation means that, for example, every time you commit, the unit test must be automatically run first, and the test will be submitted only after the test passes. At this time, if the node environment that the test depends on cannot be found, it will definitely not be run or submitted.
Solving eslint problems is easy, just configure the environment.

As for the first situation:
First, switch to the command line and try to see if it can be submitted. Looking at the screenshot, you should be using GitHub Desktop? This is not recommended at all
Secondly, check your environment configuration. For example, if you use gulp or grunt, see if there are any environment variables defined. If the configuration file defines running node from a certain path, and your local path does not correspond to the one specified, an error will also be reported.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template