Why can't git find node?

藏色散人
Release: 2022-11-07 16:29:47
Original
1713 people have browsed it

It may be that git cannot find node because husky is used. When checking the specification, the executed script cannot find node. The solution: 1. Find the hooks folder in the ".git" directory, and then Rename it; 2. Reinstall the environment.

Why can't git find node?

The operating environment of this tutorial: The operating environment of this tutorial: linux7.3 system, node18.4.0 version, Dell G3 computer.

Why can't git find node?

git cz reports an error that ""node"" cannot be found"

Using git cz reports an error that "node" cannot be found. At the same time, git commit will also report an error. It may be that husky is used to check the specifications. The executed script cannot find node (even if node has been installed correctly and the terminal can be run directly)

Solution 1:

Find the .git directory. Rename the hooks folder. At this time, the script under it will not be run when executing git commit. The error can be solved and git cz is normal. (This approach skips some checks, such as the format specification for git submission. You only need to use cz normally)

Solution 2:

Environment reinstallation Try it.

Recommended learning: "nodejs video tutorial"

The above is the detailed content of Why can't git find node?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template