如何解决全球吞咽不适用于Mac [英] how to fix global gulp not working on mac

查看:191
本文介绍了如何解决全球吞咽不适用于Mac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装npm全局包时遇到问题

例如

  npm install --global gulp-cli 

但是当我想运行gulp时

 在〜
中找不到本地gulp尝试运行:npm install gulp

code>

运行哪个gulp => / usr / local / bin / gulp

解决方案

你可以找到在这里的指南中,
您必须在您的项目依赖关系中安装gulp

  npm install --save-dev gulp 

如果您试图在一个项目之外大口喝酒,您会收到该错误



希望这可以帮助您


I am having problem with installing npm global package

for example

npm install --global gulp-cli

but when i want to run "gulp" it won't run

Local gulp not found in ~
Try running: npm install gulp

running which gulp => /usr/local/bin/gulp

解决方案

as you can find here in the guide, you have to install gulp also in your project dependencies

npm install --save-dev gulp

if you try gulp outside a project with gulp instlled as depedency you'll recevie that error

hope this helps

这篇关于如何解决全球吞咽不适用于Mac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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