5

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

Sh0T
  • 72
  • 1
  • 6

3 Answers3

6

Please make sure phantomjs is installed correctly.

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

Chris Lam
  • 3,526
  • 13
  • 10
1

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

0

I came to this question in March 2021 and had the same issue dockerizing highcharts: it worked on my machine but failed on docker run. In the end, the solution was to find a FROM node version that worked. This Dockerfile works using the latest Node docker image and almost latest highcharts npm version (always pick up specific npm versions):

FROM node:15.12.0

ENV ACCEPT_HIGHCHARTS_LICENSE YES

# see available versions of highcharts at https://www.npmjs.com/package/highcharts-export-server
RUN npm install highcharts-export-server@2.0.30 -g

EXPOSE 7801

# run the container using: docker run -p 7801:7801 -t CONTAINER_TAG
CMD [ "highcharts-export-server", "--enableServer", "1" ]
Pierre
  • 2,335
  • 22
  • 40