-
Notifications
You must be signed in to change notification settings - Fork 35
This does not work with Prisma #81
Comments
Hi @divyenduz, Thanks for reporting this issue.
I cloned your repository, then ran Netlify Build locally. The functions are bundled in I don't know Prisma, so I might need some guidance here: in particular, I am curious about the fact that the error messages tries to find a file at Also, thanks for the demo repository. Is there any chance you could reduce its size? If not, no worries, what matters is that it's reproducible :) |
So, in my case, the binary files were present in the The green ones are the required binaries They are also present in the bundled function (my original assumption about zip-it-and-ship it were wrong). I extracted the zip and could see them in the ls. But at runtime, I get this error: Which makes me believe, that the unzip + moving these files to /var/task/node_modules is missing copying the binaries. Is there a way for me to test this and/or get more visibility into this? Could you validate this? Note that the same codebase works with the GH integration of netlify. Are there any differences in the unzip logic between
What do you mean by reducing its size? |
So, I went ahead and did some more logging ( I am not sure though what is the difference between this vs |
I also logged at runtime the following information: and as I expected, there are no binaries in the case where it doesn't work ( and the binaries exist in the case where it works (GH integration) Interesting to note that the two deployment methods have different folder structure and I hope this information helps you in helping us. |
@divyenduz running into the same issue when attempting a deploy: "Error:
Invalid `prisma.user.update()` invocation in
/var/runtime/Runtime.js:66:25
Query engine binary for current platform "rhel-openssl-1.0.x" could not be found.
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in "/query-engine-rhel-openssl-1.0.x")
You already added the platforms "native", "rhel-openssl-1.0.x" to the "generator" block
in the "schema.prisma" file as described in https://pris.ly/d/client-generator,
but something went wrong. That's suboptimal.
Please create an issue at https://github.com/prisma/prisma-client-js/issues/new" Meanwhile, my [build]
command = "yarn beta"
functions = "build-functions/"
publish = "build/"
[build.environment]
# Fix to ensure the Prisma binary is packaged with the lambda function
ZISI_VERSION = "0.4.0-9" Using the latest Prisma CLI and client
"scripts": {
"beta": "cd functions && yarn && cd .. && npx prisma2 generate && netlify-lambda build functions && netlify-lambda install functions && react-scripts build"
} |
ps: I should be saying that I’m using Github integration. |
Can you try to rename your command from |
@divyenduz already opened up a new issue here. |
Is this issue closed by this? |
I think so yes 🙌 |
Describe the bug
The same project with GH integration works but doesn't work with
netlify build
andnetlify deploy
command combination.Prisma client requires latest version of ZISI (ZISI_VERSION=0.4.0-8) as it contains this fix #77
Steps to reproduce
Reproduction repository https://github.com/divyenduz/netlify-ci-build
The repo readme has all the context and reproduction steps.
Expected behavior
GH integration and
netlify build && netlify deploy
should be identical.Configuration
As mentioned in the reproduction repo's readme, both projects use netlify's beta build.
Environment
Enter the following command in a terminal and copy/paste its output:
Screenshots
https://github.com/divyenduz/netlify-ci-build
Can you submit a pull request?
No. Because possibly internal code :)
The text was updated successfully, but these errors were encountered: