问题
I have no luck building the jQuery (git) using grunt.
Everything went smoothly till the actual grunt command which outputs as following:
grunt --config Gruntfile.js
Running "update_submodules" task
TypeError: Cannot call method 'spawn' of undefined
at Object.<anonymous> (/Users/maciejbodek/Dropbox/Htdocs/git/jquery/node_modules/grunt-update-submodules/tasks/update-submodules.js:7:14)
at Object.task.registerTask.thisTask.fn (/usr/local/lib/node_modules/grunt/lib/grunt/task.js:58:16)
at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:343:36)
at Task.start (/usr/local/lib/node_modules/grunt/lib/util/task.js:359:5)
at Object.grunt.tasks (/usr/local/lib/node_modules/grunt/lib/grunt.js:143:8)
at Object.module.exports [as cli] (/usr/local/lib/node_modules/grunt/lib/grunt/cli.js:36:9)
at Object.<anonymous> (/usr/local/lib/node_modules/grunt/bin/grunt:19:14)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
Any hints appreciated. Installed all the needed npm dependiences and so on. It's just the build process that ends up being aborted.
回答1:
You need to run latest dev version of grunt, which you can get with npm install grunt@master
Also make sure you have uninstalled the old global grunt npm uninstall -g grunt
and installed grunt-cli globally npm install -g grunt-cli
.
See Upgrading from 0.3 to 0.4
来源:https://stackoverflow.com/questions/14254967/unable-to-build-jquery-with-grunt-submodule-error