Can't build jQuery on OS X 10.8.2

Can't build jQuery on OS X 10.8.2

Starting some time ago I can't build jQuery on OS X 10.8.2. It happened when master was on 1.9.0pre and it happens now when it's 2.0.0pre. If I follow instructions and run:
  1. $ npm install
  2. $ grunt
I get an error:
  1. <FATAL> Unable to find "grunt.js" config file. Do you need any --help? </FATAL>
Next, I tried to provide a config file (though it probably means README.md should be corrected):
  1. $ grunt --config Gruntfile.js
but then I get this:
  1. Running "update_submodules" task
  2. Running "selector:src/selector.js" (selector) task
  3. File 'src/selector.js' created.
  4. Running "build:dist/jquery.js:*" (build) task
  5. /usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:352
  6.           throw e;
  7.                 ^
  8. TypeError: Cannot call method 'forEach' of undefined
  9.     at Object.<anonymous> (/Users/mgol/Documents/projects/public/jquery/Gruntfile.js:297:8)
  10.     at Object.task.registerMultiTask.thisTask (/usr/local/share/npm/lib/node_modules/grunt/lib/grunt/task.js:109:15)
  11.     at Object.task.registerTask.thisTask.fn (/usr/local/share/npm/lib/node_modules/grunt/lib/grunt/task.js:58:16)
  12.     at Task.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:343:36)
  13.     at Task.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:319:9)
  14.     at Task.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:346:11)
  15.     at Task.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:319:9)
  16.     at Task.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:346:11)
  17.     at Task.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:319:9)
  18.     at Task.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt/lib/util/task.js:346:11)
I use node from Homebrew, all packages fully updated. npm version is 1.1.69, grunt version is 0.3.17