-
Notifications
You must be signed in to change notification settings - Fork 26
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
Should I need to use copy-webpack-plugin for schema.prisma in a monorepo? #14
Comments
For the second part of this issue, my guess is that this plugin is not looking in the right location due to the monorepo structure. It's definitely creating the engine files in the root
In fact, I can trick it, by creating a symlink to the root Full debug output from
|
I think I've solved my issue. I ended up pointing the output path in Seems to work with this:
But isn't this what |
hello. Sorry, but that library doesn't support yarn monorepo function yet. We are working hard to support you, but we are having difficulties in applying because of the lack of professional knowledge about monorepo. If you have solved the problem, could you please send me a pull request? thank you |
I've used serverless-webpack-prisma before in another codebase and it worked fine without giving it any specific help to find
schema.prisma
. Once I started to use it in a yarn workspaces monorepo test project, I initially got errors like this:Only after I explicitly copied it over using copy-webpack-plugin (based on this comment) with this as part of my
webpack.config.js
, the error went away:Even using
prismaPath
inserverless.yml
doesn't seem to help:So, it works, but I thought the point of @pcrodrigues0's #6 was that you can just give it the path and it shouldn't need anything else?
I say it 'works', but I am still dealing with a Prisma engine/generator error. While there is a general issue with a similar error on the main Prisma repo, I think this is more related to my serverless-webpack-prisma implementation, since in my test monorepo project, Next.js also uses the same Prisma client and it works fine there.
The text was updated successfully, but these errors were encountered: