-
Notifications
You must be signed in to change notification settings - Fork 71
Description
The Lexxy package has implicit depencies on the @lexical/extension and lexical packages (i.e. they are not mentioned explicitly in package.json)
This is not a problem when working directly on the Lexxy source code, since they are automatically installed and can be imported without problems.
But as soon as @37signals/lexxy is added as a dependency to another Yarn PnP project those transitive dependencies are no longer available and importing Lexxy yields to PnP errors.
21 │ import { buildEditorFromExtensions } from '@lexical/extension';
╵ ~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@lexical/extension" here because it's not listed
as a dependency of this package:
13 │ ...ddUpdateTag, KEY_SPACE_COMMAND, KEY_DOWN_COMMAND } from 'lexical';
╵ ~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "lexical" here because it's not listed as a dependency of this package:
Simply adding these packages as explicit dependencies to the project's package.json doesn't work either, because then Yarn seems to provide separate copies of the same package to Lexxy and to the calling project (which fortunately is detected by Lexical itself and results in a runtime error)
_QuoteNode (type quote) does not subclass LexicalNode from the lexical package used by this editor
(version <unknown>). All lexical and @lexical/* packages used by an editor must have identical versions.
If you suspect the version does match, then the problem may be caused by multiple copies of the same
lexical module (e.g. both esm and cjs, or included directly in multiple entrypoints).
``