Nx / TypeScript monorepo: Cannot find module '@scope/package' even though the folder exists

3 days ago 5
ARTICLE AD BOX

I have an Nx + TypeScript monorepo with multiple internal packages.

One package (`@datlep/database`) imports correctly:

import { User } from "@datlep/database";

But another package (`@datlep/utils`) fails with:

Cannot find module '@datlep/utils' or its corresponding type declarations.

The folder exists, has src/index.ts, and exports are defined.

However, TypeScript and Node cannot resolve it.

What causes this and how can it be fixed?

Read Entire Article