Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhantomJS error

error: Could not spawn [/root/AgarioBotsV3/node_modules/phantomjsprebuilt/lib/phantom\bin\phantomjs.exe ] executable. Please make sure phantomjs is installed correctly. error: Error: spawn /root/AgarioBotsV3/node_modules/phantomjs- prebuilt/lib/phantom\bin\phantomjs.exe ENOENT at exports._errnoException (util.js:1016:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:189:19) at onErrorNT (internal/child_process.js:366:16) at _combinedTickCallback (internal/process/next_tick.js:102:11) at process._tickCallback (internal/process/next_tick.js:161:9) at Function.Module.runMain (module.js:607:11) at startup (bootstrap_node.js:158:16) at bootstrap_node.js:575:3 i dont know how to fix please help. Im using linux ubuntu 16.04 server

like image 552
Sh0T Avatar asked Jun 28 '17 02:06

Sh0T


People also ask

What is PhantomJS used for?

PhantomJS is a discontinued headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment.

How do you debug a test in PhantomJS?

Open a new browser tab and return to the debugging portal at http://127.0.0.1:9000. There should now be a second entry in the bulleted list. Click on this entry to open a new debugger that operates in the context of your page inside PhantomJS.

How do I run PhantomJS on Windows?

Go to the “bin” folder and check phantomjs.exe file. If you are using it on a Windows OS, then you can set the path variable under the environment variable for fast access through command prompt. The command to run the PhantomJS program: C:\> phantomjs [options] file.


2 Answers

Please make sure phantomjs is installed correctly.

If you don't have it installed, run npm install -g phantomjs-prebuilt

like image 174
Chris Lam Avatar answered Nov 10 '22 22:11

Chris Lam


make sure you have a .dockerignore file.. an inside this a line node_modules

like image 1
Rodrigo Arancibia Avatar answered Nov 10 '22 22:11

Rodrigo Arancibia