Yeah whoever made webdriver-manager, made too many assumptions... :S
Find webdriver-manager\built\lib\cmds\start.js On my machine it's
C:\Users\XYZ\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\built\lib\cmds\start.js
Find the line that starts with
var seleniumProcess = spawnCommand
replace that line and the preceding line with
logger.info(process.env.JAVA_HOME+'\\bin\\java.exe' + argsToString);
var seleniumProcess = spawnCommand(process.env.JAVA_HOME+'\\bin\\java.exe', args);
Set your JAVA_HOME and you're set.
If you don't know how to set your JAVA_HOME, do this:
Run Command Prompt (cmd.exe) with admin privileges and then run
dir c:\java.exe /s/a/b
After a while, you will get at least one line of text such as
C:\Dev\Java\JDK\jre\bin\java.exe
If you get no text lines you don't have java on C drive. :( Repeat for other letters or install a Java JRE.
Pick any of those lines of text. Your java_home is that line of text except bin\java.exe. To set it, in my case I would do:
setx /m JAVA_HOME C:\Dev\Java\JDK\jre\
setx will set JAVA_HOME permanently machine-wide. If you want to set JAVA_HOME permanently for the current user remove the /m parameter. If you want to set JAVA_HOME temporarily, only for that opened "Command Prompt" window do this:
set JAVA_HOME=C:\Dev\Java\JDK\jre\
Good luck.