[英]How to change zsh shell to git shell on Mac OS?
The problem is not zsh
but the fact that you don't have gulp
installed in a directory where the shell searches for it. 问题不是zsh
,但事实上,你没有gulp
安装在一个目录,它的外壳搜索。 No shell is able to find the executable gulp
program because it is not in the $PATH
environment variable. 没有外壳程序可以找到可执行的gulp
程序,因为它不在$PATH
环境变量中。
If you are using gulp
for only one project then you probably have it installed in the current project (run npm list --depth=0
in the project directory to check). 如果仅将gulp
用于一个项目,则可能已将其安装在当前项目中(在项目目录中运行npm list --depth=0
进行检查)。 If this is the case, run it as: 如果是这种情况,请按以下方式运行:
$ node_modules/.bin/gulp
If you are using gulp
for many projects it could be useful to install it globally, at the account level. 如果将gulp
用于许多项目,则在帐户级别全局安装gulp
可能会很有用。 For that, run the following command in any directory: 为此,请在任何目录中运行以下命令:
$ npm install -g gulp
Make sure you already have a bin
directory in your home directory (create it using mkdir -p ~/bin
) because this command creates a symlink to the gulp
executable in it. 确保您的主目录中已经有一个bin
目录(使用mkdir -p ~/bin
创建它),因为此命令将在其中创建到gulp
可执行文件的符号链接。
This symlink makes gulp
available as a program to be executed from any directory. 此符号链接使gulp
可用作要从任何目录执行的程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.