{
  "id": 21432768,
  "title": "Module not found? Your AI invented a file that doesn't exist",
  "url": "https://urgent.news/2026/11/23/module-not-found-your-ai-invented-a-file-that-doesnt-exist",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-23T17:17:18.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/applied_efficiency/module-not-found-your-ai-invented-a-file-that-doesnt-exist-299f"
  },
  "original_language": "en",
  "account": "If you're using artificial intelligence to build your application and you encounter an error message that reads: \"Cannot find module './utils/formatDate',\" it doesn't necessarily mean that your code is flawed. In fact, what your AI-powered tool may have done is omitted the creation of an import for a helper file it intended to make, and then neglected to generate the file altogether. This common mistake, dubbed \"vibe-coding bug #1,\" is a stumbling block for many novices in the world of coding.\n\nTo put it simply, the issue arises when your application attempts to load a file or package that simply isn't present. The problem could stem from the file never being created, the path being incorrectly specified (especially regarding capitalization), or the package not having been installed via npm.\n\nTo remedy this issue in just a couple of minutes, start by verifying the existence of the file referenced in the path. If the issue lies with an npm package, simply run the command \"npm install package-name\" to install it. Should the file be missing, it's crucial not to delete the import statement in your code. Instead, instruct your AI to generate the missing file. The required functions should be included in the file, or you may need to correct the import path to accurately reflect the location of the actual file.\n\nIt's worth noting that this error pattern is among five that we instruct in the Debug Clinic at Last20 Academy, offering straightforward English explanations for the errors often faced by AI-built applications. The complimentary Prompt Starter Kit covers the prompts side of things. So, the next time you come across this error, remember the steps outlined above to resolve the issue swiftly and efficiently.",
  "summary": "If you're building with AI and you hit this: Error: Cannot find module './utils/formatDate' Your code isn't broken. Your AI just lied by omission. It wrote an import for a helper file it planned to create — then forgot to create it. That's vibe-coding bug #1, and it stops more beginners than almost anything else. What it actually means Your app is trying to load a file or package that isn't…",
  "key_points": [
    "\"Cannot find module\" error not due to flawed code",
    "\"Vibe-coding bug #1\" refers to omitted import and non-generated file",
    "Resolve by verifying file existence, correcting path, or installing npm package"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}