在AWS Elastic Beanstalk上全局安装npm软件包

Loo*_*urr 5 amazon-web-services node.js npm phantomjs amazon-elastic-beanstalk

我正在尝试在弹性beantalk上全局安装npm软件包。这就是我根据本文档编写的配置文件的外观。

container_commands:
  install_phantom:
    command: "npm install phantomjs -g"
Run Code Online (Sandbox Code Playgroud)

当我部署到Elastic Beanstalk时,出现此错误

实例上的命令失败。返回码:1输出:构建期间发生错误:命令install_phantom failed。

Fra*_*ort 2

根据此处给出的答案,您是否尝试过:

container_commands:
  install_phantom:
    command: "export PATH=$PATH; npm install phantomjs -g"
Run Code Online (Sandbox Code Playgroud)