lexical-beautiful-mentions@0.1.48 ships .d.ts files that import from react:
import { ComponentType } from 'react';
TypeScript resolves these types through @types/react, but the package only declares react and react-dom as peer dependencies — not @types/react. This works in flat node_modules layouts (npm, yarn) because @types/react is hoisted from the consuming project. When pnpm hoisting is disabled (hoist: false), TypeScript cannot find the React types and fails with:
error TS2307: Cannot find module 'react' or its corresponding type declarations.
Workaround:
packageExtensions:
"lexical-beautiful-mentions@0":
peerDependencies:
"@types/react": "*"
Suggested fix: Add @types/react to peerDependencies in lexical-beautiful-mentions's package.json.
lexical-beautiful-mentions@0.1.48ships.d.tsfiles that import fromreact:TypeScript resolves these types through
@types/react, but the package only declaresreactandreact-domas peer dependencies — not@types/react. This works in flatnode_moduleslayouts (npm, yarn) because@types/reactis hoisted from the consuming project. When pnpm hoisting is disabled (hoist: false), TypeScript cannot find the React types and fails with:Workaround:
Suggested fix: Add
@types/reacttopeerDependenciesinlexical-beautiful-mentions'spackage.json.