I've been using GitHub Copilot for several months now to speed up development, mostly on a Node.js/TypeScript project. Lately, I've run into a frustrating and recurring issue: it keeps suggesting `require` or `import` statements for npm packages that simply don't exist.
It's not just obscure packages, either. Sometimes they sound plausible, like a variation of a real package name (`date-utils` instead of `date-fns`). Other times, they're completely fabricated. This has led to a few wasted hours debugging "module not found" errors before realizing the source.
My questions for the community:
* Is this a known, widespread bug with Copilot, or is my experience unusual?
* Could it be related to my project's specific context or codebase?
* Has anyone found a reliable workaround beyond just being hyper-vigilant about every suggestion?
From a data integrity perspective, this feels like a significant pitfall. In my day job, we have strict change management for database migrations because a wrong step can cause data loss. This has a similar vibe—a seemingly helpful suggestion that introduces a breaking error.
- h
Data is sacred.