benhutchins / dyngoose

Elegant DynamoDB object modeling for Typescript.
https://www.npmjs.com/package/dyngoose
ISC License
89 stars 14 forks source link

Enhancement: Add compilationOption requirement of tsconfig to README.md #672

Open jayjo34 opened 10 months ago

jayjo34 commented 10 months ago

After a long time of failures using <Table>.primaryKey (kept undefined) and almost getting crazy everything worked after changing compilerOptions to : "compilerOptions": { "module": "commonjs", "target": "es2019", ...

Please add this to the README.

benhutchins commented 10 months ago

Can do. Dyngoose currently does not work using esm modules, it does need to be used within a commonjs. I do plan to change this to better support use with modern projects and those utilizing sst and similar systems.

I actually have a branch with this but I need to ensure reliable backwards compatibility with comnmonjs projects.