#about mysql2 in nest js monorepo which is undefined

1 messages · Page 1 of 1 (latest)

pallid forum
#

hey for some reason mysql2 is coming as undefined. I rm -r node_modules and install again still same.
using nest js mono repo with the default monorepo nest js cli.
couldn't it be it can't get package ? other packages are working on ly this one.

old wasp
#

btw that's not related with nestjs at all

#

what about
import * as mysql2 from 'mysql2/promise'
?

pallid forum
old wasp
#

If this code is in TS, then the correct way depends on your tsconfig. But if that’s just ESM syntax, then it’s correct