I recently upgraded the OS from El Capitan to Sierra. Now I can not run the JS unit test suit and it gives the following error in the console.
[exec] INFO [framework.browserify]: bundle built
[exec] INFO [karma]: Karma v0.12.35 server started at http://localhost:9876/
[exec] INFO [launcher]: Starting browser PhantomJS
[exec] ERROR [launcher]: Cannot start PhantomJS
[exec]
[exec] INFO [launcher]: Trying to start PhantomJS again (1/2).
[exec] ERROR [launcher]: Cannot start PhantomJS
[exec]
[exec] INFO [launcher]: Trying to start PhantomJS again (2/2).
[exec] ERROR [launcher]: Cannot start PhantomJS
[exec]
[exec] ERROR [launcher]: PhantomJS failed 2 times (cannot start). Giving up.
[exec] [11:43:19] 'test' errored after 14 s
[exec] [11:43:19] Error: 1
[exec] at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
[exec] at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
[exec] at emitOne (events.js:90:13)
[exec] at Gulp.emit (events.js:182:7)
[exec] at Gulp.Orchestrator._emitTaskDone (/Users/ssrp/workspace/clickhq-v2/frontend/node_modules/orchestrator/index.js:264:8)
[exec] at /Users/ssrp/workspace/clickhq-v2/frontend/node_modules/orchestrator/index.js:275:23
[exec] at finish (/Users/ssrp/workspace/clickhq-v2/frontend/node_modules/orchestrator/lib/runTask.js:21:8)
[exec] at cb (/Users/ssrp/workspace/clickhq-v2/frontend/node_modules/orchestrator/lib/runTask.js:29:3)
[exec] at removeAllListeners (/Users/ssrp/workspace/clickhq-v2/frontend/node_modules/karma/lib/server.js:218:7)
[exec] at Server.<anonymous> (/Users/ssrp/workspace/clickhq-v2/frontend/node_modules/karma/lib/server.js:229:9)
[exec] at Server.g (events.js:273:16)
[exec] at emitNone (events.js:85:20)
[exec] at Server.emit (events.js:179:7)
[exec] at emitCloseNT (net.js:1525:8)
[exec] at _combinedTickCallback (internal/process/next_tick.js:71:11)
[exec] at process._tickCallback (internal/process/next_tick.js:98:9)
Searched for a solution but could not. Could anybody give me the reason and and a direction to go with. Thanks.
Upgrading to PhantomJS v2.x solved the problem.