{"slug": "mistake-1-skipping-the-docs-spoiler-theyre-goated", "title": "Mistake 1: Skipping the Docs (Spoiler: They’re Goated)", "summary": "A developer building a NestJS document management system with Prisma 8 described how moving the generated prisma/ directory from src/ to the project root broke both NestJS compilation and Prisma's schema resolution. The engineer resolved the errors by reading the Prisma 8 documentation, and cautioned that AI coding assistants can suggest outdated or unsuitable configurations when given insufficient project context.", "body_md": "As a rookie starting in software development, especially in the age of AI, I could easily skip the learning phase and jump straight into building.\n\nBut my experience during my undergraduate years taught me something: shaky foundations and an inadequate understanding of the tools you're working with will eventually come back to bite you — sometimes in ways you least expect.\n\nAfter setting up my development environment and finalizing my database design, I initialized Prisma 8 in my DMS project.\n\nNow, here's the thing about AI: if you don't provide enough context about what you're working on, its suggestions can be misleading or unsuitable for your setup.\n\nChatGPT and I brainstormed and came up with this folder structure for my project:\n\n```\ndms-v2/\n├── src/\n│   ├── auth/\n│   ├── users/\n│   ├── academic-session/\n│   ├── documents/\n│   ├── providers/\n│   ├── common/\n│   ├── app.module.ts\n│   └── main.ts\n│\n├── logs/\n├── test/\n├── prisma/\n├── package.json\n└── ...\n```\n\nNotice that the `prisma/` directory is outside `src/`? Good.\n\nBut Prisma 8 initially generated the directory inside `src/`. And you know what I did?\n\nYeah, you guessed right. I moved it to the project root. 😭\n\nI thought everything was fine and continued writing my database models in `contract.prisma`.\n\nI also set up a global Prisma module in another `src/prisma/` directory so the generated Prisma client could be accessed through dependency injection across my NestJS modules.\n\nAt this point, I had two directories with different responsibilities: one at the project root for my Prisma schema and configuration, and another inside `src/` for the generated client and Prisma service.\n\nThen the problems started.\n\n**The first issue: NestJS compilation**\n\nI hit a compilation error when starting the NestJS application because a TypeScript file sat outside the directory covered by my TypeScript compilation configuration.\n\n**The second issue: Prisma couldn't find my schema**\n\nPrisma was also looking for the schema in its configured location, but I'd moved the relevant directory. As a result, subsequent Prisma commands couldn't find the schema where they expected it.\n\nI had created these problems by changing the folder structure without fully understanding how Prisma's configuration and NestJS's compilation setup worked together.\n\n**The lesson**\n\nAI is a capable tool, but I believe it's only as good as the person using it. So, I try to understand the tools I'm working with and build a solid foundation in the field so I can evaluate the solutions AI suggests rather than accepting them blindly.\n\nReading through the Prisma 8 documentation helped me resolve these issues. It also helped me tackle subsequent problems, including cases where AI suggested Prisma ORM queries based on older versions.\n\nDocumentation might not always be the most exciting thing to read, but sometimes it's exactly what I need.\n\nAnd that's one lesson I'm taking away from this experience.", "url": "https://wpnews.pro/news/mistake-1-skipping-the-docs-spoiler-theyre-goated", "canonical_source": "https://dev.to/belerickii/mistake-1-skipping-the-docs-spoiler-theyre-goated-2jbn", "published_at": "2026-10-09 04:38:05+00:00", "updated_at": "2026-10-09 04:46:18.027729+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Prisma", "NestJS", "ChatGPT", "TypeScript"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/mistake-1-skipping-the-docs-spoiler-theyre-goated", "markdown": "https://wpnews.pro/news/mistake-1-skipping-the-docs-spoiler-theyre-goated.md", "text": "https://wpnews.pro/news/mistake-1-skipping-the-docs-spoiler-theyre-goated.txt", "jsonld": "https://wpnews.pro/news/mistake-1-skipping-the-docs-spoiler-theyre-goated.jsonld"}}