错误:找不到模块'connect-livereload'

Thi*_*nan 18 grunt-contrib-watch

我正在按照网站http://yeoman.io/上提供的步骤进行操作.完成所有步骤后,我面临这个错误消息`$ grunt Loading"Gruntfile.js"任务......错误

错误:找不到模块'connect-livereload'警告:找不到任务"默认".使用--force继续`

在我的package.json中,我有我所有的依赖包

"connect-livereload":"~0.2.0","grunt-google-cdn":"~0.2.0","grunt-ngmin":"~0.0.2","grunt-contrib-livereload":" 〜0.1.2"

小智 44

我有同样的问题.以这种方式修复它:

npm install --save-dev connect-livereload
npm install
Run Code Online (Sandbox Code Playgroud)

可能是"npm install"就足够了.

  • 谢谢.我用npm install解决了 (2认同)