Skip to content

fix: restore web build (defaultTheme type + missing @eslint/js dep)#19

Merged
novincode merged 2 commits into
mainfrom
fix/web-build-theme-type
Jun 22, 2026
Merged

fix: restore web build (defaultTheme type + missing @eslint/js dep)#19
novincode merged 2 commits into
mainfrom
fix/web-build-theme-type

Conversation

@novincode

Copy link
Copy Markdown
Owner

What

CI on main went red after #14 was merged. Two root-cause fixes:

1. apps/web build failure (the hard error)

#14 ("Refactor theme import") dropped the explicit LexKitTheme annotation on defaultTheme. Without it, TypeScript infers a type that references Lexical's internal modules, which can't be named portably during next build:

./components/templates/default/theme.ts:3:14
Type error: The inferred type of 'defaultTheme' cannot be named without a
reference to '@/node_modules/lexical/LexicalEditor'. This is likely not portable.

Fix: annotate explicitly and import the type from the public @lexkit/editor entrypoint — matching the shadcn template, which was already correct.

2. Missing @eslint/js dependency (the ⨯ ESLint line)

base.js, next.js and react-internal.js in @repo/eslint-config all import @eslint/js, but it was never declared, so it isn't resolvable under pnpm's strict layout:

⨯ ESLint: Cannot find package '@eslint/js' imported from packages/eslint-config/next.js

Pre-existing and non-fatal (Next continued past it), but it's a genuine undeclared dependency. Declared at the eslint v9 major to match the other lint deps.

Verification

pnpm -F web build passes locally — all 24 pages prerender (including /docs/extensions/CollaborationExtension), no type error, ESLint loads cleanly.

PR #14 dropped the explicit `LexKitTheme` annotation on `defaultTheme`.
Without it, TypeScript infers a type that references Lexical's internal
modules, which can't be named portably when Next.js type-checks the build:

  The inferred type of 'defaultTheme' cannot be named without a reference
  to '@/node_modules/lexical/LexicalEditor'. This is likely not portable.

Annotate explicitly (matching the shadcn template) and import the type
from the public `@lexkit/editor` entrypoint.
base.js, next.js and react-internal.js all import `@eslint/js` but it
was never declared, so it isn't resolvable under pnpm's strict layout.
Next.js surfaced this during `next build`:

  ESLint: Cannot find package '@eslint/js' imported from
  packages/eslint-config/next.js

Add it at the eslint v9 major to match the other lint deps.
@novincode novincode merged commit bdabd71 into main Jun 22, 2026
1 check passed
@novincode novincode deleted the fix/web-build-theme-type branch June 22, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant