Cannot import package that uses .cjs entry
aleclarson opened this issue · comments
Alec Larson commented
import 'tsconfig-paths/register'
import { open } from 'lmdb'
Error: Cannot find module '~/node_modules/lmdb/dist/index'
The exports
field of lmdb looks like this:
"type": "module",
"main": "dist/index.cjs",
"module": "index.js",
"exports": {
".": {
"node": {
"require": "./dist/index.cjs",
"import": "./node-index.js"
},
"default": "./index.js"
}
},
Alec Larson commented
I can confirm that #139 fixes this issue
Jonas Kello commented
@aleclarson Does this work now in 3.13.0?
Alec Larson commented
Yes, thank you!