how to fix global gulp not working on mac

狂风中的少年 提交于 2019-12-25 06:28:19

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/36966312/how-to-fix-global-gulp-not-working-on-mac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!