【问题标题】:Can't run grunt --tasks, not sure what I did, how should I fix?无法运行 grunt --tasks,不确定我做了什么,我应该如何解决?
【发布时间】:2013-09-29 04:39:49
【问题描述】:

我不确定我做了什么,但grunt --tasks 现在给出了这个错误:

grunt --tasks                                                                                                                                                 

/Users/ivan/dev/frp_play/node_modules/grunt-contrib-compass/node_modules/tmp/lib/tmp.js:261
  throw err;
        ^
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object.file.exists (/Users/ivan/dev/frp_play/node_modules/grunt/lib/grunt/file.js:371:28)
    at task.loadTasks (/Users/ivan/dev/frp_play/node_modules/grunt/lib/grunt/task.js:358:18)
    at Array.forEach (native)
    at Task.task.init (/Users/ivan/dev/frp_play/node_modules/grunt/lib/grunt/task.js:444:33)
    at Object.grunt.tasks (/Users/ivan/dev/frp_play/node_modules/grunt/lib/grunt.js:113:8)
    at Object.module.exports [as cli] (/Users/ivan/dev/frp_play/node_modules/grunt/lib/grunt/cli.js:38:9)
    at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/grunt-cli/bin/grunt:41:20)

完整的 repo 在这里:https://github.com/ivanoats/frp_play

我真的想不出我所做的任何不寻常的事情。基本上我运行了这些命令:

yo webapp
bower search bacon
bower install bacon
grunt server (worked fine)
bower install bacon --save
grunt serve (broken - no task serve)
grunt --tasks (gives error above)

提前感谢您的帮助、建议和问题!

【问题讨论】:

    标签: javascript gruntjs yeoman


    【解决方案1】:

    哦。这是grunt server grunt --tasks 不是您列出任务的方式。我应该有 RTFM。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-28
    • 2018-08-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-29
    • 1970-01-01
    • 2019-10-19
    相关资源
    最近更新 更多