karma-runner / karma-phantomjs-launcher

A Karma plugin. Launcher for PhantomJS.
MIT License
281 stars 131 forks source link

Phantomjs runner doesn't work on multiple platform. #38

Open abhisheksoni opened 10 years ago

abhisheksoni commented 10 years ago

I installed the karma-phantomjs-launcher on windows and tried to use same on mac. Looks like it doesnt work on MAC.

I got this error :

ERROR [launcher]: Cannot start PhantomJS Can not find the binary node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom\phantomjs.exe Please set env variable PHANTOMJS_BIN Warning: Task "karma:unit" failed. Use --force to continue.

Is there any solution for this ?

ssoldatenkov commented 9 years ago

I have the same issue - on windows karma with phantomjs works just fine, but on mac it gives me:

Can not find the binary node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom\phantomjs.exe

chrome-launcher works perfectly on both platforms

Kikketer commented 9 years ago

Having the same issue, I noticed that it looks like it had something but I'm not sure why it's trying the win32 property:

    DEFAULT_CMD: {
        linux: require('phantomjs').path,
        darwin: require('phantomjs').path,
        win32: phantomJSExePath()
      },
dignifiedquire commented 9 years ago

Is this still an issue with the latest version?

miikka commented 9 years ago

Just bumped into this problem on Linux (Ubuntu 14.04) with the latest version of Karma and karma-phantomjs-launcher. I didn't get the error message. Instead Karma gets stuck after INFO [launcher]: Starting browser PhantomJS. According to the log, it's trying to launch the Windows exe. As a workaround, I pointed PHANTOMJS_BIN to a PhantomJS binary and everything worked.