-
Notifications
You must be signed in to change notification settings - Fork 99
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
esbuild fails with - No loader is configured for ".node" files #131
Comments
Hi @mattrochon, To resolve the above issue you would need to use .node loader. See: evanw/esbuild#1051. Let me know if this helps. |
I have tried that solution but it is not able to resolve the files on deployment to a lambda function. Bit out of my depth on this bundling stuff but very much would like to be able to use the node engine in my lambda function. |
@mattrochon What specific set-up are you using (e.g. aws starter template, esbuild template, etc.)? |
no starter template, using the aws-lambda package Build invoked like this: I use other modules that have native .node files (prisma, for example) which totally work. I only just recently added gorules and it doesnt seem to handle it int he same way. ***edit To add context, this configuration passes the build, but on deployment its not loading the .node files so i get an error that new ZenEngine() is not a constructor. |
I'm not sure how to get this to build properly using esbuild. Do you have any insight here? |
ok, add --external:@gorules/zen-engine and make sure your node modules has the binary targets you need and itll work |
Thanks for sharing! I'll close the issue now. |
@mattrochon I'm in a very similar position to yourself. Why would you mark zen-engine as an external module? Are you also copying that into the lambda? Would you mind sharing your esbuild config? Thanks for any help you can provide |
Trying to build my project with esbuild, index.js throws errors for all of the binary targets.
The text was updated successfully, but these errors were encountered: