Javascript GrunFile.js[类型错误:未定义不是函数]

Javascript GrunFile.js[类型错误:未定义不是函数],javascript,gruntjs,Javascript,Gruntjs,在终端中输入na“grunt”后,我得到了一个错误 Loading "Gruntfile.js" tasks...ERROR >> TypeError: undefined is not a function Warning: Task "default" not found. Use --force to continue. Aborted due to warnings. 这是我的Gruntile 还有我的package.json { "name": "mintsflow

在终端中输入na“grunt”后,我得到了一个错误

Loading "Gruntfile.js" tasks...ERROR
>> TypeError: undefined is not a function
Warning: Task "default" not found. Use --force to continue.

Aborted due to warnings.
这是我的Gruntile

还有我的package.json

{
  "name": "mintsflow",
  "version": "0.0.0",
  "title": "Mintsflow - Front End Worflow",
  "author": "Ericson Luciano",
  "website": "http://ericsonluciano.me",
  "url": "http://mintsflow.ericsonluciano.me",
  "description": "A personal and easy to use front end workflow using sass and grunt.js ",
  "repository": {
    "type": "git",
    "url": "http://github.com/ericsonluciano/mintsflow.git"
  },
  "license": "MIT",
  "devDependencies": {
    "bower": "~1.3.3",
    "grunt": "~0.4.4",
    "grunt-contrib-sass": "~0.7.3",
    "grunt-contrib-concat": "~0.4.0",
    "grunt-contrib-imagemin": "~0.7.0",
    "grunt-contrib-connect": "~0.7.1",
    "grunt-contrib-uglify": "~0.4.0",
    "grunt-contrib-watch": "~0.6.1",
    "grunt-contrib-clean": "~0.5.0",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-autoprefixer": "~0.7.3",
    "grunt-open": "~0.2.3",
    "grunt-notify": "~0.3.0",
    "matchdep": "~0.3.0",
    "grunt-contrib-cssmin": "~0.9.0",
    "grunt-bower": "~0.13.1",
    "connect-livereload": "~0.4.0",
    "imagemin-mozjpeg": "~0.1.2"
  },
  "dependencies": {}
}
节点-v“v0.10.26” npm-v“1.4.3” grunt--版本“grunt cli v0.1.13 grunt v0.4.4”


让我知道我的代码有什么问题。谢谢您,祝您度过愉快的一天。

我用另一个package.json阅读器替换了您的package.json阅读器

将这一行注释掉,或将其全部从Grunfile.js中删除

require('matchdep').filterDev('grunt-*').forEach(grunt.loadNPMTasks);
改为使用此包读取器,但在grunt.initConfig之前添加行({

当然,也可以将其添加到package.json中

npm install --save-dev load-grunt-tasks

我不知道你的另一个阅读器为什么不工作,但这会让你咕哝!

谢谢你的帮助。但我有更多错误:)但是我会用谷歌搜索这个问题。谢谢,阿洛蒂也有很多错误,但大多数人都在抱怨缺少文件来处理这些事情。@ericsonluciano你怎么会同意这个答案:-)@ericsonluciano你能告诉我解决这个问题的方法吗?
npm install --save-dev load-grunt-tasks