-
Notifications
You must be signed in to change notification settings - Fork 221
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
algoliasearch v5 not building in a typescript project #1538
algoliasearch v5 not building in a typescript project #1538
Comments
Hey @OutdatedGuy thanks for trying out the v5 client I've not been able to reproduce the error, it compiles correctly on my side. However from the error you shared, it seems like the peer dependencies of Was it working with v4? You can also try to install them manually ( |
Yes. On v4 it was working flawlessly but since v5 I cannot build my project :(
I installed the dependencies mentioned in the error logs with: npm install @algolia/client-personalization @algolia/client-analytics @algolia/client-abtesting; but still the same error occurs. |
Hi, we've encountered the same error, and we were able to work around it by modifying node_modules/.pnpm/[email protected]/node_modules/algoliasearch/dist/algoliasearch/builds/node.d.ts from this:
to this:
since the import path does not match the folder structure |
I have also managed to reproduce this using version
|
Hey there, thanks for providing more context to the issue! Could you please let me know if the latest version fixes the issue on your side? |
@shortcuts I tried with the latest version (5.2.1) but having the same issue. So I looked into the error file and saw imports whose paths don't exist (@algolia/client-abtesting/src/abtestingClient). So I just updated code to import from base package and it worked. Basically: - import type { AbtestingClient } from '@algolia/client-abtesting';
- import type { Region as AbtestingRegion } from '@algolia/client-abtesting/src/abtestingClient';
+ import type { AbtestingClient, Region as AbtestingRegion } from '@algolia/client-abtesting'; Can you re-open the issue? |
Hey, thanks for testing it! it was fixed in 5.2.2, could you retry please? |
Hi, I tried 5.2.2 and it worked. Thanks. |
Lets goooo enjoy!! Thanks you |
Encountering the same issue with [email protected]
It seems TypeScript (5.5.4 but also tried with 5.6.2 (latest)) doesn't respect the Removing |
hey @Mandy9943 @valeriangalliat it seems related to #1561, which should be fixed with algolia/api-clients-automation#3966 |
I think I am getting the same (or a similar) error: No matching export in "node_modules/@algolia/client-abtesting/dist/builds/browser.js" for import "Status" I can see that all the dependencies of algoliasearch (V 5.9.1) are installed. Not sure how to fix or what to try. Open to suggestions. (Please let me know if I should create a new issue for this). Edit to add link to reproduction of bug: https://stackblitz.com/edit/sveltejs-kit-template-default-qmp5ae?file=src%2Froutes%2F%2Bpage.svelte |
I'm also facing the same issue. |
Steps to reproduce:
npm install algoliasearch@5
tsc
commandThings Already Tried
npm install
andnpm update
node_modules
dir and reinstalling npm pacagesThe text was updated successfully, but these errors were encountered: