【问题标题】:How to get phantomjs to install on elastic beanstalk?如何让 phantomjs 安装在弹性豆茎上?
【发布时间】:2018-06-18 21:44:40
【问题描述】:

在过去的几个小时里,我一直在 google 并阅读不同的 SO 和 github 问题。我尝试将 phantomjs 配置文件添加到 .ebextensions 文件夹,我尝试包含一个安装 phantom js 的 buildspec 文件,以及其他一些东西,但我似乎无法在运行 nodejs 的弹性 beanstalk 实例上安装 phantomjs。这是 package.json 和错误。任何关于如何使其工作的想法都会非常有帮助。谢谢!

这是 package.json

{
  "name": "webcrawler",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "mocha **/*.test.js",
    "test-watch": "nodemon --exec 'npm test'",
    "start": "node app.js"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@types/cheerio": "^0.22.6",
    "@types/phantom": "^3.2.3",
    "cheerio": "^1.0.0-rc.2",
    "express": "^4.16.2",
    "line-by-line": "^0.1.6",
    "node-schedule": "^1.2.5",
    "phantom": "^4.0.12",
    "phantomjs-prebuilt": "^2.1.16",
    "request": "^2.83.0",
    "write": "^1.0.3"
  },
  "devDependencies": {
    "@types/chai": "^4.0.10",
    "@types/express": "^4.11.0",
    "chai": "^4.1.2",
    "mocha": "^4.0.1",
    "sinon": "^4.1.3"
  }
}

错误

phantomjs-prebuilt@2.1.16 install /tmp/deployment/application/node_modules/phantomjs-prebuilt 节点安装.js PhantomJS not found on PATH 已在 /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 下载已验证 先前下载文件的校验和提取 tar 内容(通过 产生的进程)删除 /tmp/deployment/application/node_modules/phantomjs-prebuilt/lib/phantom 复制提取的文件夹 /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1515525280131/phantomjs-2.1.1-linux-x86_64 -> /tmp/deployment/application/node_modules/phantomjs-prebuilt/lib/phantom 运行 npm 安装: /opt/elasticbeanstalk/node-install/node-v7.10.1-linux-x64/bin/npm
将 npm config jobs 设置为 1 npm config jobs 设置为 1 Running npm 带有 --production 标志无法运行 npm install。快照日志 更多细节。 UTC 2018/01/09 19:17:20 找不到应用程序 npm 调试日志位于 /tmp/deployment/application/npm-debug.log 回溯(最近一次通话最后): 文件“/opt/elasticbeanstalk/containerfiles/ebnode.py”,第 695 行,在 ....

【问题讨论】:

标签: node.js phantomjs amazon-elastic-beanstalk


【解决方案1】:

不是最理想的解决方案,但我将弹性 beanstalk 实例降级为早期版本,然后它开始工作。

【讨论】:

    猜你喜欢
    • 2018-05-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-09
    • 2013-05-13
    • 1970-01-01
    • 2016-08-19
    • 2018-03-03
    • 2016-01-13
    相关资源
    最近更新 更多