Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phantom stderr #139

Closed
RobertTheGrey opened this issue Jun 1, 2015 · 9 comments
Closed

Phantom stderr #139

RobertTheGrey opened this issue Jun 1, 2015 · 9 comments

Comments

@RobertTheGrey
Copy link

Hi there, getting a phantom error when running the sample solution tests for the first time following the blog tutorial in Visual Studio. The error I'm getting in the output window is:

phantom stderr: 'C:\Users\Rob' is not recognized as an internal or external command, operable program or batch file.

It just so happens that my user folder is actually C:\Users\Rob G\ which has a space in it and I'm assuming wallaby is struggling to run the node files it needs - in this case Phantom.

@jagreehal
Copy link

I reckon this is a duplicate of https://github.com/wallabyjs/wallaby-webpack-es7/issues/4

@RobertTheGrey
Copy link
Author

Thanks @jagreehal that does in fact represent the issue. I downloaded phantom and changed the wallaby-jasmine json file as follows and it works perfectly:

{
    "files": [
        "style/calculator.css",
        { "pattern": "lib/jquery.js", "instrument": false },
        "src/*.js",
        "test/helper/template.js"
    ],
    "tests": [
        "test/*JasmineSpec.js"
    ],
    "env": {
        "runner": "C:\\Dev\\Tools\\phantomjs-1.9.8-windows\\phantomjs.exe"
    },
    "testFramework": "jasmine@2.1.3"
}

You might want to include that in the docs @ArtemGovorov - I think there will be a lot of Visual Studio users with spaces in their user profile names.

@ArtemGovorov
Copy link
Member

@jagreehal Thanks!
@RobertTheGrey It doesn't happen to everyone with spaces in their user profiles (works fine for me even though I have spaces too), not sure yet what else affects it. But as you've said, it should be included in the docs anyway. I have added the note to the troubleshooting section.

@RobertTheGrey
Copy link
Author

Awesome. In that case maybe it's to do with the deafult path people store their global npm packages to? If phantom does not handle spaces in paths, then where is phantom located on your disk if you have spaces in your username? Would be interesting to get to the bottom of it.

@ArtemGovorov
Copy link
Member

Global npm packages shouldn't affect it because wallaby.js is using its own version of phantomjs, that is stored in IDE cache. It looks like phantomjs has issues with spaces in paths only in some cases, not always. Could be something else in the system/configuration that affects it. I have seen the issue in other projects from SO Q&A, but I haven't found any explanation for it yet (except the workaround to avoid using spaces).

@RobertTheGrey
Copy link
Author

Ok cool - I'll update if I find any more info - for now the workaround is fine for me. Having lots of fun using wallaby - great job! 👍

@ArtemGovorov
Copy link
Member

@RobertTheGrey Thanks! I'll also keep investigating the issue.

@ArtemGovorov
Copy link
Member

@RobertTheGrey @jagreehal BTW, as long as you guys are specifying the phantomjs path anyway, you may want to try our latest feature - PhantomsJs 2 support, it may make your tests to run faster.

@RobertTheGrey
Copy link
Author

Thanks @ArtemGovorov - will give it a spin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants