Gulp Error: Cannot find module 'jshint/src/cli'

lateralaus picture lateralaus · Nov 29, 2015 · Viewed 52.3k times · Source

So I've got a fresh install of El Capitan and I'm giving these task runners another go.

I'm following sitepoint's An introduction to Gulp.js, but I'm stuck on step four, when I try to run gulp jshint I get "Error: Cannot find module 'jshint/src/cli'"

I've no idea what's causing this, which is why I'm asking here. Below are a couple of screen grabs to help with the issue.

Terminal error when running gulp jshint

Folder structer for gulp project

As always, I'm eternally grateful for any advice.

Answer

fmatar picture fmatar · Dec 1, 2015

You need to install jshint as well, that will sort out the issue.

> npm install --save-dev jshint gulp-jshint