PhpStorm 无法列出 grunt 任务
PhpStorm fail to list grunt tasks
我使用 PhpStorm 的 grunt task runner 已经有一段时间了。但是在将 PhpStorm 更新到版本 10 后它停止工作了。我遇到了错误;
Failed to list grunt tasks in /js/gruntfile.js: process finished with exit code 3 (a non-zero exit code means an error)
Running tasks: /usr/local/lib/node_modules/grunt-cli/bin/grunt, _intellij_grunt_tasks_fetcher
Warning: Task "/usr/local/lib/node_modules/grunt-cli/bin/grunt" not found. Use --force to continue
Aborted due to warnings.
Process finished with exit code 3
尽管它说“/usr/local/lib/node_modules/grunt-cli/bin/grunt
未找到”,但文件实际上在那里。然后给777做了权限,看看是不是权限问题。但它仍然给我同样的错误。
我的 Grunt 设置说,
但同一个 Grunt 文件在 CLI 模式下运行良好,这正是我目前正在使用的模式。但我更喜欢使用 PhpStorm grunt task runner,因为它可以让我更轻松地通过一个 IDE.
来管理我的所有开发工作
我尝试了一些东西,也阅读了一些文档。与此特定场景无关。
根据您的 "Grunt Settings" 对话框的屏幕截图:您确实将 grunt 的路径放在要求 Node Interpreter.[=11 路径的字段中=]
提供实际节点可执行文件的路径应该可以为您解决问题。
Even though it says "/usr/local/lib/node_modules/grunt-cli/bin/grunt not found", file is actually there.
没有。
如果你再读一遍,它实际上是说“任务 xxx nod found”。这表明您很可能使用了错误的参数(错误的值或错误的顺序).. 或者参数正确但实际程序错误。
我使用 PhpStorm 的 grunt task runner 已经有一段时间了。但是在将 PhpStorm 更新到版本 10 后它停止工作了。我遇到了错误;
Failed to list grunt tasks in /js/gruntfile.js: process finished with exit code 3 (a non-zero exit code means an error)
Running tasks: /usr/local/lib/node_modules/grunt-cli/bin/grunt, _intellij_grunt_tasks_fetcher
Warning: Task "/usr/local/lib/node_modules/grunt-cli/bin/grunt" not found. Use --force to continue
Aborted due to warnings.
Process finished with exit code 3
尽管它说“/usr/local/lib/node_modules/grunt-cli/bin/grunt
未找到”,但文件实际上在那里。然后给777做了权限,看看是不是权限问题。但它仍然给我同样的错误。
我的 Grunt 设置说,
但同一个 Grunt 文件在 CLI 模式下运行良好,这正是我目前正在使用的模式。但我更喜欢使用 PhpStorm grunt task runner,因为它可以让我更轻松地通过一个 IDE.
来管理我的所有开发工作我尝试了一些东西,也阅读了一些文档。与此特定场景无关。
根据您的 "Grunt Settings" 对话框的屏幕截图:您确实将 grunt 的路径放在要求 Node Interpreter.[=11 路径的字段中=]
提供实际节点可执行文件的路径应该可以为您解决问题。
Even though it says "/usr/local/lib/node_modules/grunt-cli/bin/grunt not found", file is actually there.
没有。
如果你再读一遍,它实际上是说“任务 xxx nod found”。这表明您很可能使用了错误的参数(错误的值或错误的顺序).. 或者参数正确但实际程序错误。