fix: restore web build (defaultTheme type + missing @eslint/js dep)#19
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
CI on
mainwent red after #14 was merged. Two root-cause fixes:1.
apps/webbuild failure (the hard error)#14 ("Refactor theme import") dropped the explicit
LexKitThemeannotation ondefaultTheme. Without it, TypeScript infers a type that references Lexical's internal modules, which can't be named portably duringnext build:Fix: annotate explicitly and import the type from the public
@lexkit/editorentrypoint — matching theshadcntemplate, which was already correct.2. Missing
@eslint/jsdependency (the⨯ ESLintline)base.js,next.jsandreact-internal.jsin@repo/eslint-configall import@eslint/js, but it was never declared, so it isn't resolvable under pnpm's strict layout: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 buildpasses locally — all 24 pages prerender (including/docs/extensions/CollaborationExtension), no type error, ESLint loads cleanly.