typicode / lowdb

Simple and fast JSON database
MIT License
21.35k stars 918 forks source link

require lowdb-cjs throw Cannot read property 'join' of undefined #524

Closed naturaless closed 2 years ago

naturaless commented 2 years ago

Error Stack: image source code: image

Did cjs build config has some Error? usually,cjs source code should be like this image

miss importDefault

typicode commented 2 years ago

Hi,

Only ES modules are supported with version 3. I'm not sure where this code comes from or how it was generated, sorry. See https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

If you need CJS, I'd suggest using lowdb v1 which is CJS.