2

を実行するgrunt watchと、watch一度だけ動作します。Javascript ファイルを編集して保存した後、Grunt はすべてのファイルをコンパイル/縮小します。しかし、同じファイルをもう一度編集して保存すると、Grunt はこう言いENOENT, no such file or directory 'client/debiki/debiki-action-edit.js'ます。

(上記のファイルは、私が変更したばかりのファイルです。)ただし、ファイルは存在します。

$ ll client/debiki/debiki-action-edit.js
-rw-rw-r-- 1 kajmagnus kajmagnus 22497 Jan 21 23:47 client/debiki/debiki-action-edit.js


そしてgrunt、コマンドラインから直接実行した場合 ( なしwatch)、Grunt は常にエラーなしですべてをコンパイルできます。

何が起こっていますか?どうすればgrunt watch仕事をすることができますか?

詳細:

Ubuntu Linux、Grunt v0.3.17、Node.js v0.8.4。ではなく、組み込みのwatchタスクを使用しますgrunt-contrib-watch

完全な Grunt エラー メッセージ

Running "watch" task
Waiting...
/usr/local/lib/node_modules/grunt/lib/grunt/file.js:75
      throw grunt.task.taskError(e.message, e);
                       ^
TaskError: ENOENT, no such file or directory 'client/debiki/debiki-action-edit.js'
    at Task.taskError (/usr/local/lib/node_modules/grunt/lib/util/task.js:59:17)
    at /usr/local/lib/node_modules/grunt/lib/grunt/file.js:75:24
    at Array.filter (native)
    at Object.expandByType (/usr/local/lib/node_modules/grunt/lib/grunt/file.js:69:40)
    at Timer.<anonymous> (/usr/local/lib/node_modules/grunt/tasks/watch.js:158:44)
    at Timer.exports.setInterval.timer.ontimeout (timers.js:234:14)
4

1 に答える 1

1

最新の 0.4.0 リリース候補をインストールし、grunt-contrib-watch (およびその他の更新されたタスク) を使用する価値があるかもしれません。多くの修正と機能が 0.4.0 互換タスクに追加され、内部 0.3.x タスクはすべて移動され、grunt-contrib-* の一部としてサポートされています。

承認されてこの質問を閉じるために、コメントを回答に変換しました

于 2013-05-31T06:34:17.517 に答える