graphql-nexus / nexus-plugin-prisma

Deprecated
MIT License
829 stars 118 forks source link

Blog example: Error messages on production env #510

Open soullivaneuh opened 4 years ago

soullivaneuh commented 4 years ago

I setup your blog example using Prisma 2: https://github.com/prisma-labs/nexus-prisma/tree/master/examples/blog

I created the following Dockerfile for prod usage:

FROM node:10 as init
COPY rootfs /
WORKDIR /app

FROM init as prod
WORKDIR /build
COPY . .
RUN /entrypoint.sh
RUN yarn build
CMD node dist/main.js

This is working, but I have some unexpected alerts:

graphql_1  | GraphQL Nexus Typegen: Expected module /build/dist/context.js to be an absolute path to a TypeScript module, skipping.
graphql_1  | 🚀 Server ready at http://localhost:4000
graphql_1  | Missing required typegen import: Context

Am I not sure it's the normal behavior.

lvauvillier commented 4 years ago

Hi, Set the NODE_ENV var to "production" to get rid of this error.