chore: scaffold pronote monorepo - #2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| { | ||
| "name": "api", | ||
| "private": true, | ||
| "type": "module", | ||
| "scripts": { | ||
| "dev": "nest start --watch", | ||
| "build": "nest build", | ||
| "start": "node dist/main.js", | ||
| "start:prod": "node dist/main.js", |
There was a problem hiding this comment.
Align Nest build output with package module type
The API package is declared as ESM ("type": "module"), but the TypeScript config still emits CommonJS and the runtime scripts execute node dist/main.js. With this setup Node will load the compiled files as ES modules and immediately throw because the generated code uses require/module.exports. As a result pnpm dev/pnpm start:prod cannot boot the Nest server after a fresh build. Either drop the type: module flag or change the compiler output to ESM so the runtime format matches.
Useful? React with 👍 / 👎.
| FROM node:20-alpine | ||
| WORKDIR /app | ||
| COPY package.json pnpm-workspace.yaml .npmrc* .pnpmfile.cjs* ./ | ||
| COPY apps ./apps | ||
| COPY packages ./packages | ||
| COPY prisma ./prisma | ||
| RUN corepack enable && pnpm install --frozen-lockfile |
There was a problem hiding this comment.
Docker images cannot build without pnpm lockfile
Both API and web Dockerfiles execute pnpm install --frozen-lockfile, but the repository does not include a pnpm-lock.yaml. When the frozen flag is used and no lockfile is present, pnpm aborts with Lockfile is missing, so docker build for either service fails immediately. Either commit a lockfile or drop the --frozen-lockfile option in these images.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68dc28a98ffc83298dc7428b4c2d8710