Grunt "Gruntfile.js" 任务...错误

Grunt "Gruntfile.js" tasks...ERROR

    pm WARN EPACKAGEJSON partnerportal@0.0.0 No description
    npm WARN EPACKAGEJSON partnerportal@0.0.0 No license field.
    >> Local Npm module "grunt-autoprefixer" not found. Is it installed?
    >> Local Npm module "grunt-concurrent" not found. Is it installed?
    >> Local Npm module "grunt-contrib-concat" not found. Is it installed?
    >> Local Npm module "grunt-contrib-connect" not found. Is it installed?
    >> Local Npm module "grunt-contrib-htmlmin" not found. Is it installed?
    >> Local Npm module "grunt-contrib-jshint" not found. Is it installed?
    >> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
    >> Local Npm module "grunt-contrib-watch" not found. Is it installed?
    >> Local Npm module "grunt-filerev" not found. Is it installed?
    >> Local Npm module "grunt-google-cdn" not found. Is it installed?
    >> Local Npm module "grunt-karma" not found. Is it installed?
    >> Local Npm module "grunt-newer" not found. Is it installed?
    >> Local Npm module "grunt-ng-annotate" not found. Is it installed?
    >> Local Npm module "grunt-svgmin" not found. Is it installed?
    >> Local Npm module "grunt-usemin" not found. Is it installed?
    >> Local Npm module "grunt-wiredep" not found. Is it installed?
    Loading "Gruntfile.js" tasks...ERROR
    >> Error: Cannot find module 'time-grunt'

NPMgrunt 的新手。不确定到底发生了什么?任何想法如何调试?安装了 NPMBOWER

我认为,在 运行grunt 之前,您没有 运行 npm install 为您的项目安装所有包。一般情况下,构建一个G运行t App。我们应该运行通过以下步骤:

安装 NPM 包。

cd to_root_project_path

npm install

安装 Bower 包

bower install

最后,运行g运行t品尝

有时 sudo 和 npm install grunt 也修复了这个问题

sudo npm install grunt