Skip to content

algoliasearch v5 not building in a typescript project #1538

Closed
algolia/api-clients-automation
#3596
@OutdatedGuy

Description

@OutdatedGuy

Steps to reproduce:

  1. Create a typescript project (preferably a firebase cloud function project)
  2. Add algoliasearch with below command
    npm install algoliasearch@5
  3. Build the project using tsc command
  4. See below error
    > tsc
    
    node_modules/algoliasearch/dist/algoliasearch/builds/node.d.ts:2:48 - error TS2307: Cannot find module '@algolia/client-abtesting/src/abtestingClient' or its corresponding type declarations.
    
    2 import type { Region as AbtestingRegion } from '@algolia/client-abtesting/src/abtestingClient';
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    node_modules/algoliasearch/dist/algoliasearch/builds/node.d.ts:4:48 - error TS2307: Cannot find module '@algolia/client-analytics/src/analyticsClient' or its corresponding type declarations.
    
    4 import type { Region as AnalyticsRegion } from '@algolia/client-analytics/src/analyticsClient';
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    node_modules/algoliasearch/dist/algoliasearch/builds/node.d.ts:7:54 - error TS2307: Cannot find module '@algolia/client-personalization/src/personalizationClient' or its corresponding type declarations.
    
    7 import type { Region as PersonalizationRegion } from '@algolia/client-personalization/src/personalizationClient';
                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    
    Found 3 errors in the same file, starting at: node_modules/algoliasearch/dist/algoliasearch/builds/node.d.ts:2

Things Already Tried

  • Updating/installing packages using npm install and npm update
  • Deleting node_modules dir and reinstalling npm pacages
  • Clearing all caches and reinstalling and building project

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions