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

I am using latest version of angular-instant search and this version of instant search is causing issue in application startup #5109

Closed
Sharma1Krishna opened this issue Sep 14, 2022 · 14 comments

Comments

@Sharma1Krishna
Copy link

🐛 Bug description

🔍 Bug reproduction

Steps to reproduce the behavior:

  1. Go to ...
  2. Click on ...
  3. Scroll down to ...
  4. See error

Live reproduction:

https://codesandbox.io/s/github/algolia/create-instantsearch-app/tree/templates/instantsearch.js

💭 Expected behavior

🖥 Screenshots

Environment

  • OS: [e.g. Windows / Linux / macOS / iOS / Android]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

@Haroenv
Copy link
Contributor

Haroenv commented Sep 14, 2022

Hey @Sharma1Krishna, what's the "an issue"? Do you have a sandbox that reproduces what happens?

@Sharma1Krishna
Copy link
Author

Let me create one, I was using local earlier

@Sharma1Krishna
Copy link
Author

image

I am getting this error whenever I am starting the application

@Sharma1Krishna
Copy link
Author

Sharma1Krishna commented Sep 14, 2022

It was working earlier but it stopped when https://socket.dev/npm/package/instantsearch.js/overview/4.46.0 this version got published

I am using these two libraries in my local
"algoliasearch": "^4.14.1",
"angular-instantsearch": "^4.2.1",

here angular-instantsearch is dependent on instantsearch.js

@Sharma1Krishna
Copy link
Author

Sharma1Krishna commented Sep 14, 2022

you can try creating a new application in your local with angular version 13 with these two libraries and you will get this issue when you do ng serve

@Sharma1Krishna
Copy link
Author

Because of this issue, our whole team is blocked for the development of algolia-related stories, please help us asap.

@Sharma1Krishna
Copy link
Author

Sharma1Krishna commented Sep 14, 2022

I tried lowering the version of these libraries and it is working at

"algoliasearch": "4.12.0",
"angular-instantsearch": "4.1.0",

and need to add one dev dependency
"@types/algoliasearch": "^4.0.0",
But because this is lower version of algolia libraries , it is not compatible(a lot of existing functionality is breaking as we have also developed some customized version of algolia widgets and we are using custom connector as well) with our existing development which were based on latest version of these two libraries

@Haroenv
Copy link
Contributor

Haroenv commented Sep 14, 2022

@types/algoliasearch doesn't need to exist, algoliasearch, angular-instantsearch and instantsearch.js come with their builtin definitions

@Sharma1Krishna
Copy link
Author

Sharma1Krishna commented Sep 14, 2022

could you please try producing this issue in your local once with following version of libraries in a new anglar 13 version application?

"algoliasearch": "^4.14.1",
"angular-instantsearch": "^4.2.1",

@Sharma1Krishna
Copy link
Author

angular-tour-of-heroes.zip
@Haroenv you can use this project as well.

extract it and run "yarn install" and "ng serve"

@Sharma1Krishna
Copy link
Author

@Haroenv any update on this?

@aymeric-giraudet
Copy link
Member

aymeric-giraudet commented Sep 21, 2022

Hi @Sharma1Krishna, I'm taking over for this week,

Thank you for providing this example. I ran it and got the same error messages.

While we fix this on our end, a quick fix would be to run this in your terminal :
yarn add -D @types/react
I know this may seem weird but it will only add the types necessary to compile, React won't be shipped in your app.

@aymeric-giraudet
Copy link
Member

It will be fixed with tomorrow's release @Sharma1Krishna

@Haroenv
Copy link
Contributor

Haroenv commented Sep 22, 2022

The fix is released in 4.46.2

Haroenv added a commit to algolia/ui-components that referenced this issue Oct 10, 2022
* fix(shared): make usable when there's no preact or react

see algolia/angular-instantsearch#968, algolia/angular-instantsearch#967 and  algolia/instantsearch#5109

* Update packages/shared/src/Renderer.ts

Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>

* avoid usage of JSX.IntrinsicElements, as it can fall back to empty interface

eg. in the case there's no JSX set (angular, vue)

* add a bit more text

Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
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

No branches or pull requests

3 participants