Andrew Ross
12/30/2021, 2:49 PMprisma
package as a regular dependency as well for a container since typedefs references ./node_modules/.prisma/client/index.d.ts
?
yarn run v1.22.15
$ prisma generate node dist/src/nest/main.js
> Downloading Prisma engines for Node-API for linux-musl [] 0%> Downloading Prisma engines for Node-API for linux-musl [] 1%> Downloading Prisma engines for Node-API for linux-musl [] 2%> Downloading Prisma engines for Node-API for linux-musl [] 3%> Downloading Prisma engines for Node-API for linux-musl [] 4%> Downloading Prisma engines for Node-API for linux-musl [] 5%> Downloading Prisma engines for Node-API for linux-musl [] 6%> Downloading Prisma engines for Node-API for linux-musl [] 7%> Downloading Prisma engines for Node-API for linux-musl [] 8%> Downloading Prisma engines for Node-API for linux-musl [] 9%> Downloading Prisma engines for Node-API for linux-musl [] 10%> Downloading Prisma engines for Node-API for linux-musl [] 11%> Downloading Prisma engines for Node-API for linux-musl [] 12%> Downloading Prisma engines for Node-API for linux-musl [] 13%> Downloading Prisma engines for Node-API for linux-musl [] 14%> Downloading Prisma engines for Node-API for linux-musl [] 15%> Downloading Prisma engines for Node-API for linux-musl [] 16%> Downloading Prisma engines for Node-API for linux-musl [] 17%> Downloading Prisma engines for Node-API for linux-musl [] 19%> Downloading Prisma engines for Node-API for linux-musl [] 20%> Downloading Prisma engines for Node-API for linux-musl [] 21%> Downloading Prisma engines for Node-API for linux-musl [] 22%> Downloading Prisma engines for Node-API for linux-musl [] 23%> Downloading Prisma engines for Node-API for linux-musl [] 24%> Downloading Prisma engines for Node-API for linux-musl [] 25%> Downloading Prisma engines for Node-API for linux-musl [] 26%> Downloading Prisma engines for Node-API for linux-musl [] 27%> Downloading Prisma engines for Node-API for linux-musl [] 28%> Downloading Prisma engines for Node-API for linux-musl [] 30%> Downloading Prisma engines for Node-API for linux-musl [] 31%> Downloading Prisma engines for Node-API for linux-musl [] 32%> Downloading Prisma engines for Node-API for linux-musl [] 33%> Downloading Prisma engines for Node-API for linux-musl [] 34%> Downloading Prisma engines for Node-API for linux-musl [] 35%> Downloading Prisma engines for Node-API for linux-musl [] 36%> Downloading Prisma engines for Node-API for linux-musl [] 37%> Downloading Prisma engines for Node-API for linux-musl [] 38%> Downloading Prisma engines for Node-API for linux-musl [] 39%> Downloading Prisma engines for Node-API for linux-musl [] 40%> Downloading Prisma engines for Node-API for linux-musl [] 41%> Downloading Prisma engines for Node-API for linux-musl [] 42%> Downloading Prisma engines for Node-API for linux-musl [] 43%> Downloading Prisma engines for Node-API for linux-musl [] 44%> Downloading Prisma engines for Node-API for linux-musl [] 45%> Downloading Prisma engines for Node-API for linux-musl [] 46%> Downloading Prisma engines for Node-API for linux-musl [] 47%> Downloading Prisma engines for Node-API for linux-musl [] 48%> Downloading Prisma engines for Node-API for linux-musl [] 49%> Downloading Prisma engines for Node-API for linux-musl [] 50%> Downloading Prisma engines for Node-API for linux-musl [] 51%> Downloading Prisma engines for Node-API for linux-musl [] 52%> Downloading Prisma engines for Node-API for linux-musl [] 53%> Downloading Prisma engines for Node-API for linux-musl [] 54%> Downloading Prisma engines for Node-API for linux-musl [] 55%> Downloading Prisma engines for Node-API for linux-musl [] 56%> Downloading Prisma engines for Node-API for linux-musl [] 57%> Downloading Prisma engines for Node-API for linux-musl [] 59%> Downloading Prisma engines for Node-API for linux-musl [] 60%> Downloading Prisma engines for Node-API for linux-musl [] 61%> Downloading Prisma engines for Node-API for linux-musl [] 62%> Downloading Prisma engines for Node-API for linux-musl [] 63%> Downloading Prisma engines for Node-API for linux-musl [] 64%> Downloading Prisma engines for Node-API for linux-musl [] 65%> Downloading Prisma engines for Node-API for linux-musl [] 66%> Downloading Prisma engines for Node-API for linux-musl [] 67%> Downloading Prisma engines for Node-API for linux-musl [] 68%> Downloading Prisma engines for Node-API for linux-musl [] 69%> Downloading Prisma engines for Node-API for linux-musl [] 70%> Downloading Prisma engines for Node-API for linux-musl [] 71%> Downloading Prisma engines for Node-API for linux-musl [] 72%> Downloading Prisma engines for Node-API for linux-musl [] 73%> Downloading Prisma engines for Node-API for linux-musl [] 74%> Downloading Prisma engines for Node-API for linux-musl [] 75%> Downloading Prisma engines for Node-API for linux-musl [] 76%> Downloading Prisma engines for Node-API for linux-musl [] 77%> Downloading Prisma engines for Node-API for linux-musl [] 78%> Downloading Prisma engines for Node-API for linux-musl [] 79%> Downloading Prisma engines for Node-API for linux-musl [] 80%> Downloading Prisma engines for Node-API for linux-musl [] 81%> Downloading Prisma engines for Node-API for linux-musl [] 82%> Downloading Prisma engines for Node-API for linux-musl [] 83%> Downloading Prisma engines for Node-API for linux-musl [] 84%> Downloading Prisma engines for Node-API for linux-musl [] 85%> Downloading Prisma engines for Node-API for linux-musl [] 86%> Downloading Prisma engines for Node-API for linux-musl [] 87%> Downloading Prisma engines for Node-API for linux-musl [] 88%> Downloading Prisma engines for Node-API for linux-musl [] 89%> Downloading Prisma engines for Node-API for linux-musl [] 90%> Downloading Prisma engines for Node-API for linux-musl [] 91%> Downloading Prisma engines for Node-API for linux-musl [] 92%> Downloading Prisma engines for Node-API for linux-musl [] 93%> Downloading Prisma engines for Node-API for linux-musl [] 94%> Downloading Prisma engines for Node-API for linux-musl [] 95%> Downloading Prisma engines for Node-API for linux-musl [] 96%> Downloading Prisma engines for Node-API for linux-musl [] 97%> Downloading Prisma engines for Node-API for linux-musl [] 98%> Downloading Prisma engines for Node-API for linux-musl [] 99%> Downloading Prisma engines for Node-API for linux-musl [] 100%Prisma schema loaded from prisma/schema.prisma
Error:
Error: ENOENT: no such file or directory, copyfile '/node_modules/@prisma/index.d.ts' -> '/node_modules/@prisma/client/index.d.ts'
✔ Generated DBML Schema to ./docs/database in 22ms
✔ Generated Prisma Docs Generator to ./docs/prisma-docs-generated in 93ms
✔ Generated Prisma NestJS/GraphQL to ./src/nest/.generated/prisma-nestjs-graphql in 2.29s
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command
Andrew Ross
12/30/2021, 2:52 PMFROM node:16 as base
WORKDIR /app
COPY package.json \
yarn.lock \
./
COPY prisma ./prisma/
RUN yarn --production
RUN curl -sf <https://gobinaries.com/tj/node-prune> | sh
RUN node-prune
# lint and formatting configs are commented out
# uncomment if you want to add them into the build process
FROM base AS dev
COPY nest-cli.json \
tsconfig.* \
# .eslintrc.js \
# .prettierrc \
./
# bring in src from context
COPY ./src/ ./src/
COPY ./prisma/ ./prisma/
RUN yarn
# RUN yarn lint
RUN yarn prisma:generate && yarn build
# use one of the smallest images possible
FROM node:16-alpine
# get package.json from base
COPY --from=BASE /app/package.json ./
# get the dist back
COPY --from=DEV /app/dist/ ./dist/
COPY --from=DEV /app/prisma/ ./prisma/
# get the node_modules from the intial cache
COPY --from=BASE /app/node_modules/ ./node_modules/
# expose application port
EXPOSE 3000
# start
CMD ["yarn", "prisma:generate", "node", "dist/src/nest/main.js"]
Barnaby
12/30/2021, 3:17 PMAndrew Ross
12/31/2021, 4:38 AMAndrew Ross
12/31/2021, 4:39 AMAndrew Ross
12/31/2021, 4:39 AMBarnaby
12/31/2021, 9:32 AM