0
votes

I have a project in WebStorm with botium tests. My developer has helped me open the project and the configuration for test:botium:local. When I press the run for test:botium:local, I should get the results of botium tests. I am on Windows 10.

Instead I get this output:

"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" run test:botium:local --scripts-prepend-node-path=auto

> [email protected] test:botium:local C:\Users\julie\Botium\<my repo>
> botium-cli run --config botium.local.json --convos botium/convos

'botium-cli' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:botium:local: `botium-cli run --config botium.local.json --convos botium/convos `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:botium:local script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\julie\AppData\Roaming\npm-cache\_logs\2019-08-29T23_17_10_452Z-debug.log

Process finished with exit code 1

In my system environment variables, under edit environment variable, I have C:\Program Files\nodejs\

If I type npm -v in my terminal, I see that it's on 6.4.16.4.1

If I type botium-cli -V in my terminal, I get 'botium-cli' is not recognized as an internal or external command, operable program or batch file

If I reinstall through npm install -g botium-cli on my terminal, it appears to download again and says botium-cli@@0.0.53 at the end, updated 1 package

If I go to My C:\users\julie\AppData\Roaming\npm\node_modules there is a botium-cli folder

If I open my command line, by default I'm in Program Files\nodejs and if I type botium-cli -V I get back 0.0.530.0.53

If I navigate to the Users/julie/Botium folder where my project is and type botium-cli -V, I get back the not recognized error even though I can download it there on powershell

The edit configuration script is: "test:botium:local": "./botiumChangeConfigUrls.sh botium.json botium.local.json && botium-cli run --config botium.local.json --convos botium/convos ",

I've rebooted my PC

I've looked all over stack overflow and google

Here is the log file mentioned in the terminal:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'test:botium:local',
1 verbose cli   '--scripts-prepend-node-path=auto' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'pretest:botium:local',
4 verbose run-script   'test:botium:local',
4 verbose run-script   'posttest:botium:local' ]
5 info lifecycle [email protected]~pretest:botium:local: [email protected]
6 info lifecycle [email protected]~test:botium:local: [email protected]
7 verbose lifecycle [email protected]~test:botium:local: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~test:botium:local: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\julie\Botium\chatbot-poc\node_modules\.bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\app\julie\virtual\product\12.2.0\dbhome_1\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\julie\AppData\Local\Android\Sdk\tools\bin;C:\Users\julie\AppData\Local\Android\Sdk\tools;C:\Users\julie\AppData\Local\Android\Sdk\platform-tools;C:\Program Files (x86)\PICT\;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Maven\apache-maven-3.6.1\bin;C:\Python27;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Users\julie\ApacheJmeter\apache-jmeter-5.0\bin;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Users\julie\AppData\Local\Android\Sdk\tools\bin;C:\Users\julie\AppData\Local\Android\Sdk\tools;C:\Users\julie\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Git\cmd;C:\Program Files (x86)\PICT\;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Maven\apache-maven-3.5.4-bin\apache-maven-3.5.4\bin;C:\Python27;C:\Ruby24-x64\bin;C:\Users\julie\AppData\Local\GitHubDesktop\bin;C:\Users\julie\AppData\Local\Microsoft\WindowsApps;C:\Users\julie\AppData\Local\atom\bin;C:\Users\julie\eclipse-workspace\SceneBuilder\jtds\jtds-1.3.1.jar;;C:\Users\julie\AppData\Local\Microsoft\WindowsApps;C:\Users\julie\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle [email protected]~test:botium:local: CWD: C:\Users\julie\Botium\chatbot-poc
10 silly lifecycle [email protected]~test:botium:local: Args: [ '/d /s /c',
10 silly lifecycle   'botium-cli run --config botium.local.json --convos botium/convos ' ]
11 silly lifecycle [email protected]~test:botium:local: Returned: code: 1  signal: null
12 info lifecycle [email protected]~test:botium:local: Failed to exec test:botium:local script
13 verbose stack Error: [email protected] test:botium:local: `botium-cli run --config botium.local.json --convos botium/convos `
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\julie\Botium\chatbot-poc
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test:botium:local" "--scripts-prepend-node-path=auto"
18 verbose node v10.11.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] test:botium:local: `botium-cli run --config botium.local.json --convos botium/convos `
22 error Exit status 1
23 error Failed at the [email protected] test:botium:local script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
2
You didn't search very hard. stackoverflow.com/… - any one of the answers to any one of those questions can provide the solution to this, as the problem is common to every single program on Windows that causes the error. You don't need one specific to botium-cli to understand the issue or resolve the problem.Ken White
do you have botium-cli.cmd in C:\users\julie\AppData\Roaming\npm? Is C:\users\julie\AppData\Roaming\npm added to your system %PATH%? Also, it's a bit strange to me that the first part of your npm script (./botiumChangeConfigUrls.sh botium.json botium.local.json) doesn't cause issue - your shouldn't normally be able to run UNIX shell script on Windows using ./botiumChangeConfigUrls.sh unless you are on WSL...lena
@KenWhite I have edited my windows system environment variablesJulie Pixie

2 Answers

0
votes

In case it helps anyone, I re-ran an npm install and then npm run in the folder where my project was seemed to fix the issue

0
votes

Add C:\users\julie\AppData\Roaming\npm to your %PATH% environment variable.