2

我最近迁移到 grunt-cli 并放弃了 global grunt v0.3.x。我正在尝试全局安装 grunt-init 并遇到了一个问题,即由于缺少 bin 文件或你有什么,它没有被添加到 PATH 中,所以我在 github repo 问题跟踪器中找到了问题 29(https: //github.com/gruntjs/grunt-init/issues/29),卸载 grunt-init,运行 npm cache clear 并重新安装 grunt-init@0.2.0rc3 所以 shell 至少可以识别 grunt-init 命令,但不能当我尝试运行 grunt-init --help (或任何其他 grunt-init 命令)时,出现致命错误

$ grunt-init --help
Fatal error: Cannot call method 'apply' of undefined

或尝试搭建模板

$ grunt-init gruntfile
Running "init:gruntfile" (init) task
Warning: Cannot call method 'apply' of undefined Use --force to continue.
Aborted due to warnings.

有任何想法吗?

咕噜版本

$ grunt --version
grunt-cli v0.1.6

和 Grunt 初始化版本

$ grunt-init --version
grunt-init v0.2.0rc3
grunt v0.4.0rc5

我难住了。

4

0 回答 0