I imported Algolia in ionic5 using the command:
npm install algoliasearch --save
I imported using this command in home.ts
import algoliasearch from 'algoliasearch';
home.page.ts
in my constructor code is -
const client = algoliasearch('UVE3ADH8HY','2390abe3fff3dd8cb0354ddef86c87c3');
Now when I compile, it says
[ng] ERROR in node_modules/algoliasearch/dist/algoliasearch.d.ts:203:51 - error TS2304: Cannot find name 'Omit'.
[ng] 203 export declare type WithoutCredentials<TClient> = Omit<TClient, 'appId' | 'apiKey'>;
This thing works in 1 out of 5 times, what is wrong with Algolia? My project has many other plugins but this error pops out only with Algolia.
After Installing delete the node_modules folder and again run "npm install" . Hope that your error will be gone .