Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): add peer dependencies to install instructions #1209

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Otherwise, you can install the [`autocomplete-core`](https://www.algolia.com/doc
All Autocomplete packages are available on the [npm](https://www.npmjs.com) registry.

```bash
yarn add @algolia/autocomplete-js
yarn add algoliasearch search-insights @algolia/autocomplete-js
# or
npm install @algolia/autocomplete-js
npm install algoliasearch search-insights @algolia/autocomplete-js
Comment on lines -43 to +45
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not positive we should ask users to install algoliasearch and search-insights just to fix peer dependencies warnings, as they're not needed with third-party sources.

Maybe instead we could add a small "Troubleshooting" "FAQ" section in the Readme, to explain why we have those peer dependencies, something like:

Q: Why are there multiple peer dependencies warnings when I install autocomplete-js?
A: Autocomplete provides first-class support for Algolia sources and sending events. This means we rely on some packages that you might not need by default. These warnings can be safely ignored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should mark them as optional them? don't the typing need the packages to be installed?

```

If you don't use a package manager, you can use the HTML `script` element:
Expand Down