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

error on aws lambda #248

Open
55Cancri opened this issue Dec 7, 2024 · 1 comment
Open

error on aws lambda #248

55Cancri opened this issue Dec 7, 2024 · 1 comment

Comments

@55Cancri
Copy link

55Cancri commented Dec 7, 2024

Trying to run on aws lambda I get the error: No loader is configured for ".node" files: node_modules/.pnpm/canvas@2.11.2/node_modules/
canvas/build/Release/canvas.node node_modules/.pnpm/canvas@2.11.2/node_modules/canvas/lib/bind
ings.js

How to fix this?

@seannetlife
Copy link

it sounds like you are using esbuild or something similar to bundle your lambda. if so you need to add a loaders setting to the esbuild config:

{
  "loaders": {
    ".node": "file"
  }
}

this tells the bundler to load the ".node" files as standard files.

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

2 participants