Closed benjamin-feron closed 2 years ago
Hi @benjamin-feron
Lowdb 3 is a pure ESM package, see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c You can try to migrate your project to ESM.
Alternatively, you can also use lowdb 1 which is battle tested (still used in JSON Server) and can be require
d.
Thank you for your response. I think I will use lowdb 1
There is no "main" directive in package.json so importation of this module doesn't work. If I add
"main": "./lib/index.js"
importation works.