Open aaronik opened 4 years ago
Aha, I discovered the debug flag, now the output is:
DEBUG=nightmare node index.js
nightmare queuing process start +0ms
nightmare queueing action "goto" for https://duckduckgo.com +1ms
nightmare queueing action "type" +0ms
nightmare queueing action "click" +0ms
nightmare queueing action "wait" +0ms
nightmare queueing action "evaluate" +0ms
nightmare running +0ms
nightmare electron child process exited with code 127: command not found - you may not have electron installed correctly +7ms
nightmare electron child process not started yet, skipping kill. +1ms
which is pretty clearly saying that electron is not installed. However I do have nightmare installed, as the docs suggested, so I thought electron was supposed to come with it. The process really should at least return an error code, if not a helpful message, when this happens.
I'm still stuck though, because I don't know how to get electron installed correctly. Can you help? Thanks!
I had the same issue (on ubuntu 18.04). I think I got a step closer...
Running yarn run electron
got me:
electron: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
error Command failed with exit code 127.
I then tried:
sudo apt -y install libgconf2-4
and now electron starts up fine, and I can run some scripts. Running tests (copied from the homepage) still hangs for me somehow (but at least it hangs after "run", without an electron error).
Hope this helps.
Ahh... also found the selector is off in the sample test. Try:
.click('#search_form_homepage_top .js-search-button')
Then everything worked
Seems like there are many hidden steps required to even get this running. I've decided to go with nightwatch.js for my testing needs since this library seems pretty rickety.
Similar to #1515, except their fix is not working for me.
I also tried
npm cache clean --force
, still to no avail.The code I'm running is straight from the example:
My package.json:
I'd copy the output of what I've run but there simply is none. The command
node index.js
instantly finishes with no output and no error code. (echo $?
returns0
)