javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -


i lost "unknown" error:

karma.conf.js:

frameworks: ['mocha', 'should'],  plugins: ['karma-mocha',           'karma-should',                         'karma-phantomjs-launcher'],  ... browsers: ['phantomjs'], 

error:

23 07 2015 14:35:37.691:warn [karma]: no captured browser, open http://localhost:9876/ 23 07 2015 14:35:37.701:info [karma]: karma v0.13.3 server started @ http://localhost:9876/ 23 07 2015 14:35:37.707:info [launcher]: starting browser phantomjs 23 07 2015 14:35:37.738:error [karma]: { [error: spawn unknown] code: 'unknown', errno: 'unknown', syscall: 'spawn' } error: spawn unknown     @ exports._errnoexception (util.js:749:11)     @ childprocess.spawn (child_process.js:1093:11)     @ exports.spawn (child_process.js:933:9)     @ object._execcommand (c:\users\jinga4x\git\mdl-sample-project\node_modules\karma\lib\launchers\process.js:63:21)     @ object._start (c:\users\jinga4x\git\mdl-sample-project\node_modules\karma-phantomjs-launcher\index.js:72:10)     @ object.<anonymous> (c:\users\jinga4x\git\mdl-sample-project\node_modules\karma\lib\launchers\process.js:14:10)     @ emitone (events.js:82:20)     @ object.emit (events.js:166:7)     @ object.start (c:\users\jinga4x\git\mdl-sample-project\node_modules\karma\lib\launchers\base.js:41:10)     @ c:\users\jinga4x\git\mdl-sample-project\node_modules\karma\lib\launcher.js:88:15     @ array.foreach (native)     @ launch (c:\users\jinga4x\git\mdl-sample-project\node_modules\karma\lib\launcher.js:40:11)     @ invoke (c:\users\jinga4x\git\mdl-sample-project\node_modules\karma\node_modules\di\lib\injector.js:75:15)     @ server.<anonymous> (c:\users\jinga4x\git\mdl-sample-project\node_modules\karma\lib\server.js:161:24)     @ server.g (events.js:257:16)     @ emitnone (events.js:67:13) 

i installed phantomjs npm install -g phantomjs, getting output:

looks `npm install -g` on windows; unable check installed version. download available @ c:\users\myuser\appdata\local\temp\phantomjs\phantomjs-1.9.8-windows.zip extracting zip contents removing c:\users\myuser\appdata\roaming\npm\node_modules\phantomjs\lib\phantom copying extracted folder c:\users\myuser\appdata\local\temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1437719855881\phantomjs-1.9.8-windows -> c: \users\myuser\appdata\roaming\npm\node_modules\phantomjs\lib\phantom writing location.js file done. phantomjs binary available @ c:\users\myuser\appdata\roaming\npm\node_modules\phantomjs\lib\phantom\phantomjs.exe c:\users\myuser\appdata\roaming\npm\node_modules\phantomjs\node_modules\which 

before launching test tried executing file shown below, same result:

c:\users\myuser\appdata\roaming\npm\node_modules\phantomjs\lib\phantom\phantomjs.exe 

the user profile running node:

users\jinga4x 

does not match user profile running phantom:

users\myuser 

so install phantom manually:

references


Comments

Popular posts from this blog

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -