I have problem when I try to use mongodb.connect() func..
import mongodb from "mongodb" import dotenv from "dotenv" dotenv.config() mongodb.connect()
Then error appears ” Property ‘connect’ does not exist on type ‘typeof import(..)
Advertisement
Answer
The connect functions exits inside mongoose package.
Look into this link for more info [https://www.npmjs.com/package/mongoose]