我没有运用grunt构建jQuery(git)。无法使用grunt构建jquery - 子模块错误
一切顺利直到实际咕噜命令,其输出如下:
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)
理解任何提示。安装了所有需要的npm依赖项等。这只是最终被中止的构建过程。
看起来你可能会使用咕噜的版本错误。你在全球安装了什么版本的grunt?如果它是咕噜0.3.x,那么你将无法运行Gruntfile(它似乎是grunt-0.4.x Gruntfile.js)。 – smithclay
@smithclay是的,我运行0.3.17。愚蠢的问题 - 我如何更新到最新的devel(0.4.x)? 'npm install grunt @ 0.4'似乎可以工作,但是我得到0.3作为'grunt --version'的输出。 – ienes