我正在尝试在我的webstorm IDE中安装和配置angular-seed。创建项目并下载angular-seed后,我试图运行$(document).ready(function() {
$("#userResults").on("click", "a.employee", function(e) {
e.preventDefault();
$("#editId").val($(this).data("id"));
});
});
命令安装所有依赖项,如页面所示(https://github.com/angular/angular-seed)。但我在尝试运行命令时发现以下错误。错误如下:
npm install
我首先尝试通过运行命令bower angular-route#~1.4.0 ENOGIT git is not installed or not in the PATH
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! angular-seed@0.0.0 postinstall: `bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-seed@0.0.0 postinstall script 'bower install'.
npm ERR! This is most likely a problem with the angular-seed 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 their info via:
npm ERR! npm owner ls angular-seed
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\User\WebstormProjects\untitled\npm-debug.log
然后运行另一个命令npm install -g bower
来安装bower,但它也不起作用。它显示了另一个错误:
bower install angular
任何人都可以帮我找到问题的解决方案。请让我知道我做错了什么。
答案 0 :(得分:2)
你安装了git吗? 如果您运行cmd.exe并写入
git
你看到了什么?如果git在全局路径中正确安装,你会看到git help。
如果git仅作为Git Bash安装,你可以在Git Bash中运行bower。
或者您可以(重新)使用此选项安装git,然后将在命令promt(全局路径)中使用git