安装后找不到Gulp命令 [英] Gulp command not found after install

查看:161
本文介绍了安装后找不到Gulp命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 ├──tildify @ gulp(全局),它看起来像它的工作,因为它运行这个代码: 0.2.0 
├──interpret@0.3.5
├──pretty-hrtime@0.2.1
├──deprecated@0.0.1
├──archy @ 0.0.2
├──minimist@0.2.0
├──semver@2.3.2
├──orchestrator@0.3.7(stream-consume@0.1.0,sequencify @ 0.0.7,end-of-stream@0.1.5)
├──chalk@0.5.1(escape-string-regexp@1.0.1,ansi-styles@1.1.0,supports-color@0.2 .0,strip-ansi@0.3.0,has-ansi@0.1.0)
├──gulp-util@2.2.20(lodash._reinterpolate@2.4.1,dateformat@1.0.8-1.2。 3,vinyl@0.2.3,through2@0.5.1,multipipe@0.1.1,lodash.template@2.4.1)
├──liftoff@0.12.0(extend@1.2.1,minimist@0.1 .0,resolve@0.7.4,findup-sync@0.1.3)
└──vinyl-fs@0.3.5(graceful-fs@3.0.2,lodash@2.4.1,mkdirp@0.5。 0,strip-bom@0.3.1,vinyl@0.2.3,through2@0.5.1,glob-watcher@0.0.6,glob-stream@3.1.14)

但是, n我输入 gulp 它表示 -bash:gulp:command not found



任何想法发生了什么?

解决方案

原来,npm安装在错误的目录中,所以我不得不通过运行以下代码更改npm config prefix:

  npm config设置前缀/ usr / local 

code>

然后我重新安装了全球的gulp(使用-g param)并且它正常工作。



这篇文章是我找到解决方案的地方: http://webbb.be/blog/ command-not-found-node-npm


I installed gulp(globally) and it looks like it worked because it ran this code:

├── tildify@0.2.0
├── interpret@0.3.5
├── pretty-hrtime@0.2.1
├── deprecated@0.0.1
├── archy@0.0.2
├── minimist@0.2.0
├── semver@2.3.2
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)
├── chalk@0.5.1 (escape-string-regexp@1.0.1, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── gulp-util@2.2.20 (lodash._reinterpolate@2.4.1, dateformat@1.0.8-1.2.3, vinyl@0.2.3, through2@0.5.1, multipipe@0.1.1, lodash.template@2.4.1)
├── liftoff@0.12.0 (extend@1.2.1, minimist@0.1.0, resolve@0.7.4, findup-sync@0.1.3)
└── vinyl-fs@0.3.5 (graceful-fs@3.0.2, lodash@2.4.1, mkdirp@0.5.0, strip-bom@0.3.1, vinyl@0.2.3, through2@0.5.1, glob-watcher@0.0.6, glob-stream@3.1.14)

But when I type gulp it says -bash: gulp: command not found

Any idea what's going on?

解决方案

Turns out that npm was installed in the wrong directory so I had to change the "npm config prefix" by running this code:

npm config set prefix /usr/local

Then I reinstalled gulp globally (with the -g param) and it worked properly.

This article is where I found the solution: http://webbb.be/blog/command-not-found-node-npm

这篇关于安装后找不到Gulp命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆