Closed shadow1349 closed 3 years ago
Can you make a reproduction on GitHub? This issue is likely related to your webpack configuration, which doesn't set InstantSearch up for compilation. As you can see from examples like https://github.com/algolia/angular-instantsearch/tree/v3/examples/e-commerce there's no such issue.
@Haroenv I have created a repo here: https://github.com/shadow1349/Test-InstantSearch-App-with-AngularUniversal
You will be able to reproduce the error I am seeing. If you have a fix that would be great! Thanks!
@Haroenv have you been able to confirm the issue I'm talking about? Looking at the package.json
in this project I can see that instantsearch.js
version is 2.8.0 which is way behind the latest version
Ah I didn't notice that yet, you need to use InstantSearch < 3 for Angular InstantSearch. Angular InstantSearch v3 (now in beta) is compatible with InstantSearch 3
@Haroenv I've tried that and it still generates that error at run time. However, interestingly enough it doesn't actually break the page. I'm currently hosting a site using angular-instantsearch in Google Cloud Run using Angular Universal for SEO.
My logs are packed with these errors, but that doesn't actually break anything which is extremely odd.
I have not whitelisted those packages. I will definitely try that and get back to you! Thanks.
Describe the bug 🐛
I am trying to use angular-instantsearch with @nestjs/ng-universal. Everything builds correctly, but when I try to serve the app I get the following error:
here are my dependencies and versions:
To Reproduce 🔍
Steps to reproduce the behavior:
ng add @nestjs/ng-universal
angular-instantsearch
NgAisModule.forRoot()
to the imports in yourapp.module.ts
filenpm run build:ssr
this should be successfulnpm run serve:ssr
this will fail with the error above.Expected behavior 💭
App should run properly with Angular instant search.
Environment: