Closed bertdeblock closed 11 months ago
fs-extra v9 is a cjs module, so it doesn't have named exports. If this lib wants to (reliably) use named exports, it should upgrade fs-extra to v11, and import the named exports from fs-extra/esm.
fs-extra
fs-extra/esm
More info: https://github.com/jprichardson/node-fs-extra#esm
I'm not sure how most of these imports work fine in this lib (maybe because of TS?), but the error mentioned in #1368 is consistently reproducible.
You can also easily reproduce the error by running a JS file with the following contents:
import { readJsonSync } from 'fs-extra'; console.log(readJsonSync);
Closes #1368.
Related issue in the TS repo: https://github.com/microsoft/TypeScript/issues/54018
fs-extra
v9 is a cjs module, so it doesn't have named exports. If this lib wants to (reliably) use named exports, it should upgradefs-extra
to v11, and import the named exports fromfs-extra/esm
.More info: https://github.com/jprichardson/node-fs-extra#esm
I'm not sure how most of these imports work fine in this lib (maybe because of TS?), but the error mentioned in #1368 is consistently reproducible.
You can also easily reproduce the error by running a JS file with the following contents:
Closes #1368.