gulp-local-screenshots icon indicating copy to clipboard operation
gulp-local-screenshots copied to clipboard

Phantom JS not recognized command

Open teej043 opened this issue 8 years ago • 6 comments

OS: Windows 7 64bit Node: 0.12.4 NPM: 2.10.1

Image of issue

teej043 avatar Mar 07 '16 15:03 teej043

Hey, do you have phantomjs installed ?

danielhusar avatar Mar 07 '16 18:03 danielhusar

I didn't installed it myself, but I had the expectation that npm will download and extract it automatically, I mean some packages that uses phantomjs does that.

[edit] Sorry, I missed the part that I had to install phantomjs manually.

teej043 avatar Mar 08 '16 09:03 teej043

PhantomJS installed, but now I get this error:

Teej@TEEJ-PC /c/wamp/www/frontend-jeldwen (master)
$ npm cache clear

Teej@TEEJ-PC /c/wamp/www/frontend-jeldwen (master)
$ gulp screens
[18:37:53] Using gulpfile C:\wamp\www\frontend-jeldwen\gulpfile.js
[18:37:53] Starting 'screens'...
[18:37:53] Finished 'screens' after 9.17 ms
phantom stdout: NETWORK_ERR: XMLHttpRequest Exception 101: A network error occur
red in synchronous requests.


phantom stdout:   phantomjs://code/shim.js:1815 in send
  phantomjs://code/shim.js:1815 in _start
  phantomjs://code/shim.js:1842



Teej@TEEJ-PC /c/wamp/www/frontend-jeldwen (master)
$ phantomjs --version
2.1.1

teej043 avatar Mar 08 '16 10:03 teej043

Issue seems to be with Phantom 2.x. I uninstalled and installed: npm install -g [email protected]

It now runs my task ok, but still get warnings:

phantom stdout: SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

timtwomey avatar Jun 18 '16 16:06 timtwomey

same behavior here under debian with [email protected] intalled. with ans1 being the returned value of phantom.create in the index.js

[23:14:36] gulp-debug: build/index.html file /mnt/c/Users/ticapix/workspace/runabove/build/index.html url http://localhost:8000/index.html ans1 Server { options: { prefix: '', response_limit: 131072, websocket: true, jsessionid: false, heartbeat_delay: 25000, disconnect_delay: 5000, log: [Function: log], sockjs_url: 'https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.min.js' }, _events: { connection: [Function: handler] }, _eventsCount: 1, install: [Function] } [23:14:36] gulp-debug: 1 item phantom stdout: NETWORK_ERR: XMLHttpRequest Exception 101: A network error occurred in synchronous requests.

ticapix avatar Jan 02 '17 21:01 ticapix

switched to gulp-webshot

ticapix avatar Jan 02 '17 21:01 ticapix