[v3.2.0] commonjs compatibility with node's module resolution #1439
I discovered the issue in one of our CD job. We are testing that the packages (just released) have their dependencies correctly listed and can start in a minimal environment (no typescript or any framework).
The easy way to do so is to just import our package on its own and try to run the import with node. The test does not start any Dexie instance.
Step to reproduce
yarn init -y; yarn add firstname.lastname@example.org
Create a simple
echo "require('dexie');" > index.js
Run the script:
output (with node 16) (equivalent error with node 12 and 14):
This error is due to a new property (
Dexie is not meant to run in node.js and this use case is probably out of scope.
The text was updated successfully, but these errors were encountered:
Thanks for a nice repro. I could resolve the issue by following the guidelines for the exports field to support also require. But the exports field has turned out to be a bit complex and I will need to have a beta out for a while with this new change to make sure it works in all scenarios. A beta will be be released in a few days.