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

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Oct 19, 2023

Summary

Peer dependency warnings are given if you don't install those, so we should at least have them in the main install instructions.

Could also make sense to do it in a separate "before you start" instructions, but not sure if that is clearer or more confusing.

Result

fixes #1208

@Haroenv Haroenv requested review from a team, dhayab and sarahdayan and removed request for a team October 19, 2023 13:48
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7763564:

Sandbox Source
@algolia/autocomplete-example-github-repositories-custom-plugin Configuration
@algolia/autocomplete-example-instantsearch Configuration
@algolia/autocomplete-example-playground Configuration
@algolia/autocomplete-example-preview-panel-in-modal Configuration
@algolia/autocomplete-example-react-renderer Configuration
@algolia/autocomplete-example-starter-algolia Configuration
@algolia/autocomplete-example-starter Configuration
@algolia/autocomplete-example-reshape Configuration
@algolia/autocomplete-example-vue Configuration

Comment on lines -43 to +45
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
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?

@Haroenv Haroenv closed this Mar 7, 2024
@Haroenv Haroenv deleted the Haroenv-patch-1 branch March 7, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn add @algolia/autocomplete-js produces a bunch of unmet peer dependency warnings
2 participants