Skip to content
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

Replace chrome-aws-lambda with @sparticuz/chromium because of lacking node 16 support #49

Open
bastiW opened this issue Dec 4, 2022 · 2 comments

Comments

@bastiW
Copy link

bastiW commented Dec 4, 2022

There seem to be some issues with node 16. So people are downgrading to node version 14. (e. g. here #35 (comment))

So I would suggest moving away from chrome-aws-lambda and using @sparticuz/chromium instead. This lib is more up-to-date and it looks like it supports node 16.

@bastiW
Copy link
Author

bastiW commented Dec 6, 2022

I have tested it with @sparticuz/chromium

See this commit in my local repository.

6d922b8

When I use it within the ./example directory everything works 😃

@bastiW
Copy link
Author

bastiW commented Dec 6, 2022

Unfortunately when I deploy it to vercel I get the following error:

2022-12-06T20:57:33.992Z	a679715f-e69b-4abe-8d70-f5c1cf49e755	ERROR	[Error: ENOENT: no such file or directory, open '/var/task/node_modules/@sparticuz/chromium/bin/chromium.br'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/var/task/node_modules/@sparticuz/chromium/bin/chromium.br'
}
2022-12-06T20:57:33.992Z	a679715f-e69b-4abe-8d70-f5c1cf49e755	ERROR	[Error: ENOENT: no such file or directory, open '/var/task/node_modules/@sparticuz/chromium/bin/chromium.br'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/var/task/node_modules/@sparticuz/chromium/bin/chromium.br'
}
RequestId: a679715f-e69b-4abe-8d70-f5c1cf49e755 Error: Runtime exited with error: exit status 1
Runtime.ExitError

For testing I have published a fork to the following npm repository:
https://www.npmjs.com/package/next-api-og-image-sparticuz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant