简体   繁体   English

PhantomJS 错误

[英]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 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. 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我不知道如何修复请帮助。 Im using linux ubuntu 16.04 server我使用的是 linux ubuntu 16.04 服务器

Please make sure phantomjs is installed correctly.

如果你没有安装它,运行npm install -g phantomjs-prebuilt

确保你有一个 .dockerignore 文件.. 在这里面有一行 node_modules

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.我在 2021 年 3 月遇到了这个问题,并且在 dockerizing highcharts 时遇到了同样的问题:它在我的机器上运行但在 docker run 上失败了。 In the end, the solution was to find a FROM node version that worked.最后,解决方案是找到一个有效的 FROM 节点版本。 This Dockerfile works using the latest Node docker image and almost latest highcharts npm version (always pick up specific npm versions):这个 Dockerfile 使用最新的 Node docker 镜像和几乎最新的 highcharts npm 版本(总是选择特定的 npm 版本):

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" ]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM