Nexus-plugin-prisma: Package Size and AWS Deploy issues

Created on 27 Jul 2020  路  5Comments  路  Source: graphql-nexus/nexus-plugin-prisma

Im trying to deploy AWS Lambda a very simple project using Apollo, Nexus/Schema and Prisma.

But Im bumping on the size of the project, what surprises me because it is very simple, with only one table.

Digging up the problem I discovered that the size of nexus-plugin-prisma it is the cause of the problem.

image

Someone faced similar problem?

typdocs

Most helpful comment

same issue here, even the basic project won't deploy to lambda because of the package size and nexus-plugin-prisma is the main contributor to that.

All 5 comments

same issue here, even the basic project won't deploy to lambda because of the package size and nexus-plugin-prisma is the main contributor to that.

If you're using serverless framework, then I was able to work around this excluding unneeded files:
package: # Optional deployment packaging configuration include: # Specify the directories and files which should be included in the deployment package - dist/** - node_modules - '!node_modules/.prisma/client/query-engine-darwin' - '!node_modules/.prisma/client/query-engine-debian-openssl-1.1.x' - '!node_modules/@types/**' - '!node_modules/@prisma/cli/introspection-engine-debian-openssl-1.1.x' - '!node_modules/@prisma/cli/introspection-engine-darwin' - '!node_modules/@prisma/cli/migration-engine-debian-openssl-1.1.x' - '!node_modules/@prisma/cli/migration-engine-darwin' - '!node_modules/@prisma/cli/prisma-fmt-debian-openssl-1.1.x' - '!node_modules/@prisma/cli/prisma-fmt-darwin' - '!node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x' - '!node_modules/@prisma/cli/query-engine-darwin' - '!node_modules/@prisma/sdk/prisma-fmt-debian-openssl-1.1.x' - '!node_modules/@prisma/sdk/prisma-fmt-darwin' - '!node_modules/@prisma/sdk/migration-engine-debian-openssl-1.1.x' - '!node_modules/@prisma/sdk/migration-engine-darwin' - '!node_modules/@prisma/sdk/introspection-engine-darwin' - '!node_modules/@prisma/sdk/introspection-engine-debian-openssl-1.1.x' - '!node_modules/@prisma/sdk/query-engine-debian-openssl-1.1.x' - '!node_modules/@prisma/sdk/query-engine-darwin' - '!node_modules/aws-sdk/**' exclude: # Specify the directories and files which should be excluded in the deployment package - src/**

@kokokenada wow, this looks awesome!

Thanx!

@kokokenada you should be able to drop the entire !node_modules/@prisma/cli directory.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

narciero picture narciero  路  3Comments

marticrespi picture marticrespi  路  4Comments

RAW4RMCS picture RAW4RMCS  路  3Comments

ndom91 picture ndom91  路  4Comments

malekjaroslav picture malekjaroslav  路  5Comments