Skip to content

@repo/lib/constants does not resolve — three web components use an alias that isn't mapped #1548

Description

@rajarshidattapy

Severity: Low
Files: apps/web/components/integrations/chrome-detail.tsx:3,
apps/web/components/nova/nova-empty-state.tsx:3,
apps/web/components/onboarding/x-bookmarks-detail-view.tsx:7

Description

Three files import the Chrome extension URL through an alias that neither
apps/web/tsconfig.json nor the @repo/lib exports map can resolve:

import { CHROME_EXTENSION_URL } from "@repo/lib/constants"
components/integrations/chrome-detail.tsx(3,38): error TS2307:
  Cannot find module '@repo/lib/constants' or its corresponding type declarations.

apps/web/tsconfig.json maps @repo/ui/*, @ui/*, @lib/*, and @hooks/*
but not @repo/lib/*. Resolution then falls to the package's own exports map,
{"./*": "./*"}, which points at packages/lib/constants (extensionless); the
actual file is constants.ts, and TypeScript's bundler resolution does not
append extensions after an exports-map substitution.

Every other consumer in the repo uses the mapped alias:

apps/web/app/(app)/brain/page.tsx:10:       import { SHARED_TEAM_BRAIN_TAG } from "@lib/constants"
apps/web/components/app-experience.tsx:46:  import { DEFAULT_PROJECT_ID } from "@lib/constants"
apps/web/components/dashboard-view.tsx:23:  import { CHROME_EXTENSION_URL, RAYCAST_EXTENSION_URL } from "@lib/constants"

Webpack/Turbopack apply extension resolution more permissively than tsc, so
these likely still bundle at runtime — but the import is unsound and it is one
of the errors keeping check-types red (see #1544).

Suggested fix

Change the three imports to @lib/constants to match the rest of the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions