docsearch icon indicating copy to clipboard operation
docsearch copied to clipboard

Issue with peer dependencies of `@docsearch/react`

Open brc-dd opened this issue 3 years ago • 2 comments

Ref.: https://github.com/vuejs/vitepress/issues/472#issuecomment-1013835336


@docsearch/js is using @docsearch/react with preact, but @docsearch/react wants react, react-dom, @types/react as its peer dependencies, which is throwing warnings. peerDependenciesMeta can be used to mark react (peer)dependencies in @docsearch/react as optional. (It is supported by latest versions of npm, yarn, pnpm.)

brc-dd avatar Jan 16 '22 09:01 brc-dd

Also, I am not sure why @algolia/autocomplete-preset-algolia is listed as dependency of @docsearch/react.

@algolia/autocomplete-preset-algolia wants @algolia/client-search as a peer dependency, but @docsearch/react doesn't provide it, this is also giving a warning.

brc-dd avatar Jan 16 '22 09:01 brc-dd

I also encountered this problem

sleeprite avatar Mar 25 '22 20:03 sleeprite