[BUG] No such file or directory (...../../bin/chromium.br)
See original GitHub issueEnvironment
chrome-aws-lambda
Version: 2.0.1puppeteer
/puppeteer-core
Version: 2.0.0/2.0.0- OS: Built on Fedora 29, NodeJS 10.17.0, Serverless 1.58.0, serveless-webpack 5.3.1
- Node.js Version: 10.x
- Lambda / GCF Runtime: Lambda
Expected Behavior
Chromium should have been launched
Current Behavior
Inflating chromium raised an error:
2019-11-25T21:11:33.586Z 233af41f-a717-499e-818f-08acb732ee55 INFO { [Error: ENOENT: no such file or directory, open 'node_modules/chrome-aws-lambda/source/../bin/chromium.br']
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'node_modules/chrome-aws-lambda/source/../bin/chromium.br' }
Possible Solution
Use let input = join(__dirname, '..', 'bin');
here
Steps to Reproduce
Create a webpack
+ serverless
package that does not use layers, ie. the compressed files are included in the package at node_modules/chrome-aws-lambda/bin
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Chrome Binary Not Found on AWS Lambda Using Serverless ...
Chrome Binary Not Found on AWS Lambda Using Serverless and chrome-aws-lambda Node package ; "errorMessage": "ENOENT: no such file or directory, ...
Read more >Netlify functions + Headless Chrome - Support
site: mevorach Problem: Trying to use Headless Chrome to get a website's title and ... no such file or directory, open '/var/task/netlify/bin/chromium.br'] ...
Read more >CSCvh04263 - Critical mkdir failed error seen in ... - Cisco Bug
Beta testing Symptom: We see failures to create directories while joining the domain on WSA. Wed Dec 6 15:47:10 2017 Debug: PROX_AUTH ...
Read more >pipewire pactl no such file or directory - Launchpad Bugs
fresh kinetic install pw.conf execvp error pactl no such file or directory is it supposed to be there? error from pipewire.
Read more >Moodle in English: Cache warning bug
... failed to open stream: No such file or directory in ... I have not yet managed to trigger the bug though. ----------------------------....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I bumped into this issue as well. @campidelli, your solution works best if there’s only 1 entry in the Webpack config. However, if one wants to bundle multiple functions (e.g. serverless’
slsw.lib.entries
using “package individually”), the binary files will be copied to every function’s bundle. If one only need chromium in 1 function, this behavior will occupy unnecessary storage from their AWS lambda shared code storage.I propose to use Webpack’s
file-loader
instead so that one gains more control of which function bundles should include chromium. I’m using the following Webpack config currently:…and then add these imports to the top of the handler file where you need chromium:
I hope someone finds this useful, and thanks @campidelli for your solution and pointers 🙂
Hi there, just in case this problem happens to anyone else, I worked around it by configuring my
webpack.config.js
as follows: