[英]spawn casperjs ENOENT error on AWS elastic beanstalk
I am trying to run a casper scraper on nodejs using SPOOKY.我正在尝试使用 SPOOKY 在 nodejs 上运行 casper scraper 。 The scraper works fine when I run it on the localhost but gives the error below when I deploy the project on AWS elastic beanstalk server.
当我在本地主机上运行时,刮板工作正常,但在 AWS 弹性 beantalk 服务器上部署项目时出现以下错误。
Error: spawn casperjs ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
[nodemon] app crashed - waiting for file changes before starting...
I have tried setting binPath: './node_modules/casperjs/bin/casperjs'"
and tried installing Casper globally but was unable to do it. I also added command: /^win/.test(process.platform) ? 'casperjs.cmd' : 'casperjs',
to the child but that did not work out either.我尝试设置
binPath: './node_modules/casperjs/bin/casperjs'"
并尝试全局安装 Casper 但无法做到。我还添加了command: /^win/.test(process.platform) ? 'casperjs.cmd' : 'casperjs',
给孩子,但这也没有奏效。
I have been searching this for more then a week but was unsuccessful.我已经搜索了一个多星期,但没有成功。
Please help me in this issue.请帮助我解决这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.