supertokens-node/recipe/session dont support esm ?
p
supertokens-node/recipe/session dont support esm ?
Since the structure is completely built on esm, it is currently giving an error in the session
n
Can I see the error?
p
node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:362 const err = new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base)); /node_modules/supertokens-node/recipe/session CustomError: ERR_UNSUPPORTED_DIR_IMPORT
n
And what line is this complaining for?
p
it doesn't show it
n
Is this complaining locally or when deploying on some platform?
p
local
ts-node --esm --swc --transpile-only ./index.ts
n
Can you include this flag and see if that resolves it
--experimental-specifier-resolution=node
p
no all diffrent packages error because only esm used
n
Hmm I would recommend opening an issue about this for supertokens-node and we can take a look at it, please include information like the version of typescript and ts-node you are using so that we can test for this better
n
Thanks, well take a look
this is problem
import Session from 'supertokens-node/recipe/session/index.js'
and fixed
n
The issue stems from that the SDK imports for example
/recipe/session
which would normally auto resolve to
/recipe/session/index.js
but isnt. We are evaluating this
p
hmm okay reopen issua
8 Views