autocomplete
autocomplete copied to clipboard
`yarn add @algolia/autocomplete-js` produces a bunch of unmet peer dependency warnings
Description
Maybe there's something specific about my project, but when I add @algolia/autocomplete-js I get a bunch of "unmet peer dependency" warnings. I get the same warnings with a new project. Maybe these warnings are intentional but they seem pretty unfriendly and should be fixed, imo.
Reproduction
Steps
- Create a new project.
- Run
yarn init
- Run
yarn add @algolia/autocomplete-js
- Received output
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The engine "pnpm" appears to be invalid.
[3/4] Linking dependencies...
warning "workspace-aggregator-8d0bd819-678b-4381-8a21-4e795aadea2f > frontend > @algolia/[email protected]" has unmet peer dependency "@algolia/client-search@>= 4.5.1 < 6".
warning "workspace-aggregator-8d0bd819-678b-4381-8a21-4e795aadea2f > frontend > @algolia/[email protected]" has unmet peer dependency "algoliasearch@>= 4.9.1 < 6".
warning "workspace-aggregator-8d0bd819-678b-4381-8a21-4e795aadea2f > frontend > @algolia/autocomplete-js > @algolia/[email protected]" has unmet peer dependency "@algolia/client-search@>= 4.9.1 < 6".
warning "workspace-aggregator-8d0bd819-678b-4381-8a21-4e795aadea2f > frontend > @algolia/autocomplete-js > @algolia/[email protected]" has unmet peer dependency "algoliasearch@>= 4.9.1 < 6".
warning "workspace-aggregator-8d0bd819-678b-4381-8a21-4e795aadea2f > frontend > @algolia/autocomplete-js > @algolia/[email protected]" has unmet peer dependency "@algolia/client-search@>= 4.9.1 < 6".
warning "workspace-aggregator-8d0bd819-678b-4381-8a21-4e795aadea2f > frontend > @algolia/autocomplete-js > @algolia/[email protected]" has unmet peer dependency "algoliasearch@>= 4.9.1 < 6".
warning "workspace-aggregator-8d0bd819-678b-4381-8a21-4e795aadea2f > frontend > @algolia/autocomplete-js > @algolia/autocomplete-core > @algolia/[email protected]" has unmet peer dependency "search-insights@>= 1 < 3".
[4/4] Building fresh packages...
Done in 3.88s.
Expected behavior
No warnings should be thrown.
Environment
- OS: Linux
- Autocomplete version: v1.11.1
I'm not sure how we can solve this, but you should install algoliasearch
before or right after installing autocomplete. Normally most information should already be updated with npm install algoliasearch @algolia/autocomplete-js
. If you copied from somewhere that doesn't have that, I'd gladly fix it
I mean, the readme of this repo (at least on the next
branch, which is default) says you should install the package with
yarn add @algolia/autocomplete-js
# or
npm install @algolia/autocomplete-js
If that's not the right way for someone looking to install this project to get started it should say that. Additionally, the project will still warn about unmet peer dependencies. You still need to install @algolia/client-search and search-insights. I get that those are required by projects that aren't this one, but I think they should be either included as dependencies for this project, or at least included in the documentation of how to install this project.