phantomjs icon indicating copy to clipboard operation
phantomjs copied to clipboard

Error while executing hello world

Open ghost opened this issue 10 years ago • 3 comments

  1. Which version of PhantomJS are you using? Tip: run phantomjs --version.

2.1.13

  1. What steps will reproduce the problem?

a) phantomjs --version

or

a) Create a hello.js file with:

console.log('Hello, world!');
phantom.exit();`

b) than phantomjs hello.js

  1. Which operating system are you using?

Alpine (inside docker container)

  1. Did you use binary PhantomJS or did you compile it from source?

Binary straight out of NPM

  1. Please provide any additional information below.

Error log for both steps

Error executing phantom at /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
Error: spawn /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT
    at exports._errnoException (util.js:1012:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:577:11)
    at run (bootstrap_node.js:352:7)
    at startup (bootstrap_node.js:144:9)
    at bootstrap_node.js:467:3

ghost avatar Oct 08 '16 02:10 ghost

I think the problem is in your setup. You should check if this path /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs exists and contains the correct executable file.

vitallium avatar Oct 15 '16 14:10 vitallium

@Vitallium I am not sure how to say it is a correct executable :-) how can that be a reply even?

At that path the said file exists with executable permission

You just install phantom either by nom or by zip, and simply phantomjs on command line it gives this error

rajiff avatar May 11 '17 01:05 rajiff

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

stale[bot] avatar Dec 29 '19 09:12 stale[bot]