WebStorm无法安装gulp-htmlbuild,提示git clone … undefined错误的解决方法

来源:互联网 发布:ntfs foe mac教程 编辑:程序博客网 时间:2024/06/06 10:06

WebStorm无法安装gulp-htmlbuild,提示git clone … undefined错误的解决方法

系统环境

Windows10 WebStorm10

问题描述

WebStorm中为了使用gulpjs,需要在WebStorm中安装gulp-htmlbuild。WebStorm中打开 View —> Tool Windows —> Terminal 即可打开终端命令行。此时输入npm的安装命令:

npm install gulp-htmlbuild

会提示安装失败。查看控制台打印的信息,会显示如下错误 :

error: git clone <路径> undefined

解决方法

我已经确定安装了Git,但是npm总是提示git clone失败。后来我中命令行中输入 git,系统提示没有此命令。于是我想到可能是环境变量的问题,打开: 我的电脑 —> 鼠标右键 —> 属性 —> 高级系统设置 —> 高级选项卡 —> 环境变量
在PATH 中的末尾加上; 然后把 “git安装路径/bin” 粘贴到末尾就可以了。

0 0