Skip to content

Instantly share code, notes, and snippets.

@anantakrishna
Created December 9, 2022 17:30
Show Gist options
  • Save anantakrishna/97250b7726b1d3b7640872f24d6cd5d3 to your computer and use it in GitHub Desktop.
Save anantakrishna/97250b7726b1d3b7640872f24d6cd5d3 to your computer and use it in GitHub Desktop.
Minimal reproducible example for `algoliasearch` not being callable when `moduleResolution` is `Node16`
import algoliasearch from "algoliasearch";
const client = algoliasearch("APPID", "APIKEY");
{
"name": "repro-algoliasearch-not-callable",
"version": "1.0.0",
"main": "index.js",
"type": "module",
"engines": {
"node": "16"
},
"dependencies": {
"algoliasearch": "^4.14.2"
},
"devDependencies": {
"@types/node": "^18.11.12",
"typescript": "^4.9.4"
}
}
{
"compilerOptions": {
/* Language and Environment */
"target": "es2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
/* Modules */
"moduleResolution": "Node16" /* Specify how TypeScript looks up a file from a given module specifier. */,
/* JavaScript Support */
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
"checkJs": true /* Enable error reporting in type-checked JavaScript files. */,
/* Emit */
"noEmit": true /* Disable emitting files from a compilation. */,
/* Interop Constraints */
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
/* Type Checking */
"strict": true /* Enable all strict type-checking options. */,
/* Completeness */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment