D:\tools\HBuilder5.5\workplaces\gulp-demo>gulp jshint
module.js:471
throw err;
^
Error: Cannot find module 'jshint/src/cli'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\tools\HBuilder5.5\workplaces\gulp-demo\node_module
s\gulp-jshint\src\extract.js:1:79)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
安装jshint 的命令是npm install --save-dev gulp-jshint
经过查找发现这个有问题,换了个新的安装命令nmp install --save-dev jshint gulp-jshint 问题就解决了