This expression is not callable. Type 'typeof import("...../node_modules/algoliasearch/index")' has no call signatures.ts(2349)


I wanted to start the integration and implementation of algolia into my app and get this error after installing algoliasearch and trying to initialize a client’

This expression is not callable. Type ‘typeof import("…/node_modules/algoliasearch/index")’ has no call signatures.ts(2349)

const algoliasearch = require('algoliasearch');

const client = algoliasearch(


Could you make a GitHub setup with what typescript version you are using etc? The code is correct in theory

I’m not using typescript, im using nodejs and its working but somehow I need to import it like

import algoliasearch from ‘algoliasearch’;

do I use a wrong library or how to require the algoliasearch library?

That should work, can you create a reproduction somewhere?

yes it works, it gives actually a linting error:

this linting warning happens when you don’t add the dependency. If it works that you should eslint-disable the warning