Closed ts-web closed 8 years ago
From what you described, this looks like an issue with https://github.com/Medium/phantomjs as it is the package that provides the path to PhantomJS
binary. So please report the issue on their issue tracker.
Closing this for now, feel free to ask if you have followup questions.
I'm running node 5.3.0 on Windows, with phantomjs@1.9.19 installed globally. So the path to phantom.CMD is
C:\Program Files\nodejs\phantomjs.CMD
(note the space in Program Files).I am encountering an error when I run
grunt mocha
(which uses grunt-lib-phantomas):So you see the problem is related to improper handling of a filepath containing a space.
I debugged the source code, and I saw that in
lib/phantomjs.js
(line 164), the code is callinggrunt.util.spawn()
with thecmd
option having a value ofC:\Program Files\nodejs\phantomjs.CMD
.I've tried working around it by surrounding the value in quotes, adding a backslash character before the space (i.e.
binPath.replace(' ', '\\ ')
), and usingopts.cwd
.But no luck.The only other workaround is to not use global phantomjs...
Any insight / ideas? Thanks