Clever TaglineC
Convex Community4mo ago
7 replies
Clever Tagline

Cannot find module 'convex/_generated/api'

Out of nowhere I started getting this type check error when running
npx convex dev
. The only file reporting this supposed error is a custom hook, and the import line looks like this:

import { api } from "convex/_generated/api";

This same import syntax is used in a couple dozen other files with no problem: custom hooks, components, etc. The actual behavior of the custom hook is fine. No problems using the queries it contains.

I've updated to the latest version of Convex, and still get this type check error. I've checked a couple of other threads here reporting similar problems, but can't find a solution that'll work.

I'm mostly ignoring it for now, but it would be nice to know why it's claiming there's a problem when there isn't. 🤷‍♂️
Was this page helpful?