node.js - git clone了angular-phonecat项目后执行npm install时报错
天蓬老师
天蓬老师 2017-04-17 14:00:55
0
2
616

C:Usershpangular-phonecat>npm install

> angular-phonecat@0.0.0 postinstall C:\Users\hp\angular-phonecat
> bower install

bower angular#1.5.x             ENOGIT git is not installed or not in the PATH

    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
    npm ERR! Windows_NT 10.0.10586
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
    npm ERR! node v4.4.3
    npm ERR! npm  v3.9.6
    npm ERR! code ELIFECYCLE
    npm ERR! angular-phonecat@0.0.0 postinstall: `bower install`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the angular-phonecat@0.0.0 postinstall script 'bower install'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the angular-phonecat package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     bower install
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs angular-phonecat
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls angular-phonecat
    npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\hp\angular-phonecat\npm-debug.log
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
黄舟

Problem resolved. The problem is that the error ENOGIT git is not installed or not in the PATH occurs when the cmd command of win10 is switched to angular-phonecat to execute bower install. The specific solution is as follows:

Method 1: Configure the environment variables of Git;
The default installation directory of git is C:Program Files (x86)Git, just add C:Program Files (x86)Gitbin;C:Program Files (x86)Gitcmd; to the path of the system variable and return to execution;

Method 2: Use Git Bash to replace cmd

Peter_Zhu

Didn’t you execute bower install?

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