-
-
Save chimmelb/6342504893b2b9fce0f4a8efd096ae60 to your computer and use it in GitHub Desktop.
# This is for ElasticBeanstalk with Amazon Linux 2023. For previous Linux 2 or Linux 1, see revisions for ideas | |
packages: | |
yum: | |
cups-libs: [] | |
libdrm: [] | |
libXdamage: [] | |
libXfixes: [] | |
libXrandr: [] | |
mesa-libgbm: [] | |
libxkbcommon: [] | |
dbus-glib: [] | |
libXrandr: [] | |
libXcursor: [] | |
libXinerama: [] | |
cairo: [] | |
cairo-gobject: [] | |
pango: [] | |
liberation-sans-fonts: [] | |
libwayland-client: [] | |
libwayland-cursor: [] | |
gtk3: [] | |
gdk-pixbuf2: [] | |
libxkbcommon: [] | |
libXScrnSaver: [] | |
libpkgconf: [] | |
atk: [] | |
at-spi2-atk: [] | |
at-spi2-core: [] | |
alsa-lib: [] | |
commands: | |
refresh-fonts: | |
command: | | |
fc-cache-64 -f -v |
I just updated this gist for the versions that are currently working for me. Presumably they will become out of a date again.
Doesn't work for me:
2020-10-13 22:17:41,853 [ERROR] -----------------------BUILD FAILED!------------------------
2020-10-13 22:17:41,853 [ERROR] Unhandled exception during build: Command libwayland-client failed
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 171, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 129, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 530, in build
self.run_config(config, worklog)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 542, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 260, in build
changes['commands'] = CommandTool().apply(self._config.commands)
File "/usr/lib/python2.7/site-packages/cfnbootstrap/command_tool.py", line 117, in apply
raise ToolError(u"Command %s failed" % name)
ToolError: Command libwayland-client failed
Platform branch: Node.js 10 running on 64bit Amazon Linux 2
Current platform version: 5.2.2
I can't get this to work as random packages fail install, and even when they don't packages are still required. The process of updating and deploying takes a while. Is there not a simpler more reliable way to do this?
My environment is EBS Amazon Linux 2 and Node 12.
Same here, not working anymore
Doesn't work for me:
2020-10-13 22:17:41,853 [ERROR] -----------------------BUILD FAILED!------------------------ 2020-10-13 22:17:41,853 [ERROR] Unhandled exception during build: Command libwayland-client failed Traceback (most recent call last): File "/opt/aws/bin/cfn-init", line 171, in <module> worklog.build(metadata, configSets) File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 129, in build Contractor(metadata).build(configSets, self) File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 530, in build self.run_config(config, worklog) File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 542, in run_config CloudFormationCarpenter(config, self._auth_config).build(worklog) File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 260, in build changes['commands'] = CommandTool().apply(self._config.commands) File "/usr/lib/python2.7/site-packages/cfnbootstrap/command_tool.py", line 117, in apply raise ToolError(u"Command %s failed" % name) ToolError: Command libwayland-client failed
Platform branch: Node.js 10 running on 64bit Amazon Linux 2
Current platform version: 5.2.2
Were you able to find a solution for this ? I am getting the same error
We recently moved to Amazon Linux 2 and the upgrade had some changes for this config. (Revision 4)
Available Yum libs made it all a lot easier. I added the comments (prefixed with #
) live in this gist, so if they break, remove them!
Linux (1) ideas are in the prior revisions.
You are my hero! Thank you so much!
This worked with Node.js 16 running on 64bit Amazon Linux 2/5.5.6
🎉
Thank you!!
I found an easy way on Amazon Linux 2 is just:
packages:
yum:
google-chrome-stable: []
This will install all required libraries with google chrome, even if you use the local installation from puppeteer afterwards.
Additionally I needed to configure the cache directory of puppeteer to a local directory, because how staging of new versions works on Elastic Beanstalk. Just put a .puppeteerrc.cjs
in your project root:
const {join} = require('path');
/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
@falco467 I'm facing the similar issue with Playwright package which cannot use due to dependencies issue. Please see my latest log which I raised in StackOverflow and if you can point me what I'm doing wrong. Thanks
https://stackoverflow.com/questions/74696909/error-in-aws-elastic-beanstalk-for-using-playwrightcrawler-package
And how do you install puppeter (in my case playwright)?
I tried with command
npx playwright install chromium
but it throws error
@wojtekKrol
Exactly as @SFaraji wrote in his StackOverflow answer. You need to install playwright with EBCONFIG file:
command: PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install
Another version change at the repository. had to update to: