I updated from OSX El Capitan to MacOS Sierra and began seeing PhantomJS errors.
$ rspec <some feature test
... The detector #<struct Cliver::Detector command_arg=nil, version_pattern=nil> failed to detect theversion of the executable at '/app/node_modules/phantomjs-prebuilt/bin/phantomjs'
How can I resolve this?
After some playing around, I realized that $ phantomjs --version
was not returning anything. Strange. I also checked both
$ brew list
$ npm ls
and saw that neither listed phantomjs as one of their packages. Looks like I had an issue with my phantomjs install. I decided to do a completely fresh install of phantomjs.
I began by determining where phantomjs is installed:
$ which phantomjs
/usr/local/bin/phantomjs
Remove it:
$ rm -rf /usr/local/bin/phantomjs
$ phantomjs -v
-bash: /usr/local/bin/phantomjs: No such file or directory
Good. Now install phantomjs with npm:
$ npm -g install phantomjs-prebuilt
$ phantomjs -v
2.1.1
This looks promising. Lets run our spec again:
$ rspec <some feature test>
1 example, 0 failures
Success.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With