Search code examples
wml

watchman watch run on wml url not working


I am using mac os version 13+ (Venture)

I am trying to set up "wml" in my local development environment.

I finding the solutions in Stack Overflow and some random websites.

I did not find the very specific answer or very strong answer.

My problem is when I run the "wml start" command , nothing happen.

Other random solutions are keep saying watchman need to watch the wml's exact dir, but for me .

I tried several times, It keep showing error like this

this console response is when run sudo watchman watch "wml's exact directory"

the owner of /opt/homebrew/var/run/watchman/root-state is uid 501 and doesn't match your euid 0

This console response is when I run just "watchman watch "just wml's exact dir"

{ "version": "2023.03.06.00", "error": "watchman::RootResolveError: failed to resolve root: unable to resolve root /opt/homebrew/lib/node_modules/wml/src/cli/index.js: /opt/homebrew/lib/node_modules/wml/src/cli/index.js: Not a directory" }

I don't know what is wrong with me.

I doubt that wml dir is not correct ? How can I find the wml's exact dir in M2 mac..

I installed the wml by npm install -g wml command.

My expectation is to be able to run "wml start" in mac book m2 properly


Solution

  • I was facing the same issue. This worked for me.

    add your wml/src dir to watchman list will do, like this.

    watchman watch /Users/rcrabwu/.nvm/versions/node/v8.9.0/lib/node_modules/wml/src
    

    Note: change the directory according to your node directory.

    For Reference