Error from grunt watch - Moodle 3.9

Error from grunt watch - Moodle 3.9

by Dave Emsley -
Number of replies: 6

Hi all,

I've installed a new Ubuntu 20.04 server and getting the error:

demsley@sc1430:/home/mymoodlesite/public_html/moodle$ grunt watch
Running "watch" task
Watchman:  spawn watchman ENOENT
>> Error: spawn watchman ENOENT
Done.
demsley@sc1430:/home/mymoodlesite/public_html/moodle$


I've done some searching on the internet and I'm not really understanding the solutions offered as they're a bit beyond my technical skills.  I can code in PHP/JS but that's about my limit.

If someone can give sopme guidance I'd be grateful.


Cheers

Dave


Average of ratings: Useful (1)
In reply to Dave Emsley

Re: Error from grunt watch - Moodle 3.9

by Dave Emsley -
So after much searching I tried:

apt-get install watchman

Which worked after I increased the amount of inotify watchers as per...

https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers


Hope this is helpful to someone else; if not useful then admin please delete.


Cheers

Dave

Average of ratings: Useful (8)
In reply to Dave Emsley

Re: Error from grunt watch - Moodle 3.9

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I have a feeling this is very useful and should be in the dev wiki. Will come back to it when I try to do this stuff.
In reply to Dave Emsley

Re: Error from grunt watch - Moodle 3.9

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I don't normally like to dig up posts from the grave but I had exactly the same problem and your fix helped me out. I've added a note on the Grunt page in the dev docs.

I can't help feeling that the cost of entry to Javascript dev in Moodle is creeping higher. There's no more avoiding a reasonably good understanding of node and friends.
Average of ratings: Useful (2)
In reply to Dave Emsley

Re: Error from grunt watch - Moodle 3.9

by The Dreamer -
On macOS, simply use Homebrew: brew install watchman