-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how do you install external dependencies? #118
Comments
@JaredAAT did you ever figure this out? I'm working with the same package |
If anyone else runs into this, the solution is to Note: I also needed to include serverless.yml
package.json
|
Hey @alecmcgovern I've attempted this solution and when I run it locally (
I'm not certain the solution you're suggesting is the answer to my own issue, but it seems related. I'm getting the following error when I actually run the lambda:
Relevant part of the code in question: import chromeAwsLambda from 'chrome-aws-lambda';
import { PDFOptions } from 'puppeteer-core';
export class PDFGenerator {
static genPdf = async (url: string, options: PDFOptions ): Promise<Buffer> => {
console.log(`Offline: ${process.env.IS_OFFLINE}`)
const executablePath = process.env.IS_OFFLINE == 'true'
? './node_modules/puppeteer/.local-chromium/mac-1011831/chrome-mac/Chromium.app/Contents/MacOS/Chromium'
: await chromeAwsLambda.executablePath;
console.log(`Exec Path: ${executablePath}`)
const browser = await chromeAwsLambda.puppeteer.launch({
args: chromeAwsLambda.args,
executablePath
});
const page = await browser.newPage(); Using node16 fwiw. |
@wcpines The first error you're seeing is probably because you're using serverless 2/3 and this package isn't actively maintained anymore: #133 (comment) |
when looking at this part of the documentation:
given a serverless.yml of:
how do you go about running
cd external_modules/chrome-aws-lambda && npm i --prod
?The text was updated successfully, but these errors were encountered: