-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Is it possible to transpile the lib? #660
Comments
As a workaround, I used this lambda layer, which contains the lib properly compiled for AWS lambda execution environment. |
@nbusser since it uses the binary which is compiled, you will have to use the layers or copy the node modules. |
@ShivamJoker I added the lib in my builder's (esbuild) externals. |
That's great. I think you can close the issue now, since there is no other way to use it. |
Don't you think it is possible to somehow transpile the library to produce a linux build? I'm thinking of using some shady npm arguments or stuff. |
You can't compile a compiled binary. Ideally npm packages contain mostly js and CSS which the transpiler understands. At the end the library is just executing the binary when you call the API via js. |
Ok I now understand what you mean, makes sense! However, there should be one different binary for each architecture. |
I think there are some flags which you can use, but the best way to get it is by installing it in a system where you'll be running eg. Amazon linux 2. |
@nbusser see npm/rfcs#519 (comment)
|
Hijacking this since I defaulted to the layer. In "theory", something like Thanks for the lib :) |
Hi,
I'm using a mac M1 and I want to build the lib for a linux system (AWS lambda).
When I install the package on my computer, I have the following file-tree:
When running the lambda on AWS, I have the following error message:
I conclude that npm build script builded a specific version for my architecture.
Is it then possible to transpile the lib for another architecture ?
The text was updated successfully, but these errors were encountered: