I've got a developer how has node_modules installe...
# prisma-whats-new
l
I've got a developer how has node_modules installed on his mac, and once our functions are deployed we keep getting this error in one of our functions:
invalid ELF header
, from bcrypt. This is probably from the fact that the node_modules were installed and native code compiled on his Mac, is there a fix for this in progress?
a
You can switch to bcryptjs (easy), or build on Linux (harder)
l
Thank you very much, bcryptjs worked. Is there an issue for adding automatic building to the framework?
I know we talked about this before, I can't see the thread anymore though...
a
No stupid Slack
You need a running Linux docker to build native modules for Linux, but that would mean always doing a clean
npm install
in Docker, before deploying, which will slow the deploy down a lot.
As it's only needed for native modules, it's easy to add that to a npm script in your project yourself.
It's not really easy if you don't have Docker installed, nor if your team hasn't dealt with Docker yet. Also it's just unnecessary complication for the end user. I can no longer just run graphcool deploy
And native modules are plentiful in my experience, this is going to continue to cause issues for people
NABI and WASM could help someday, but not yet
a
I haven't come across any solution for compiling native modules other than Docker
👍 1
l
I'm just suggesting that the framework should do it automatically on the user's machine or in graphcool's servers
a
If you don't have Docker, it can't happen on the user machine
It could happen on the GC server
l
Couldn't the framework install Docker as part of installation?
a
Well, if you use the local environment, you already need Docker
l
It could install it from source and hopefully do a local install scoped to your project
True
a
I actually created an issue earlier, I linked it to yours
👍 1
My proposal was having Graphcool run their own cloud instance to do the building
However, if you are already running Docker, it's literally a one-liner...
👍 1
l
I guess the biggest issue is that we haven't started using the local environment yet, once we do then yep
a
Good point
A proper CI solution might also do the trick
👍 1