-
Notifications
You must be signed in to change notification settings - Fork 224
Closed
Closed
Copy link
Labels
Description
I originally reported this over here, but the "skipLibCheck": false
was a red herring for my particular issue (still leaving it open in case it's interesting on its own): #1564
Description
CodeSandbox: https://codesandbox.io/p/devbox/p6w2mq?file=%2F.codesandbox%2Ftasks.json%3A12%2C15
Running algoliasearch
with tsx
and ESM ("type": "module"
) will cause a crash
- Create an ESM project with
"type": "module"
inpackage.json
- Add
algoliasearch
andtsx
- Create a
index.ts
file with a simple named import ofalgoliasearch
- Run
pnpm tsx index.ts
- 💥 Observe the crash with the error message below
cc @shortcuts wonder if this is related to algolia/api-clients-automation#3966 (considering that the error is in a .ts
file)
Client
Search
Version
5.9.1
Relevant log output
pnpm tsx index.ts
/project/workspace/node_modules/.pnpm/[email protected]/node_modules/algoliasearch/builds/models.ts:19
import { EventType } from '@algolia/client-personalization';
^
SyntaxError: The requested module '@algolia/client-personalization' does not provide an export named 'EventType'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Node.js v20.12.0
nfarina, kvkenyon, rick-colosl, martinnabhan and shortcuts