Getting a "Local gulp not found in..." error working with the Bower lesson
I am trying to work along with the new Bower lesson, and I have installed gulp globally, but when I run "gulp watch" I get error..
laravel-5 [develop] :) gulp watch
[07:55:04] Local gulp not found in ~/Documents/GIT/laravel-5
[07:55:04] Try running: npm install gulp
laravel-5 [develop] :)
This is really my first interaction with gulp, so I am probably missing a step, but I have rewetted the video a few times & cannot see what I am doing wrong.
I think it's because other node modules when using gulp as a variable (gulp = require('gulp')), will look for it in the node_modules directory rather than looking for a globally installed gulp. So the only reason for the globally installed one is as arabsight says, to have CLI access to the gulp command.
I'd be interested to know why node modules can't just use the globally installed gulp instead though. I guess there are instances where you need gulp in a node module but don't need the CLI command and you would want those modules to work even if gulp is not installed globally ?