Unable to import package under node16
module resolution mode
#324
Labels
bug
Something isn't working
node16
module resolution mode
#324
Environment
consola@3.2.3
node@23.4.0
Reproduction
Describe the bug
While in a Typescript project with the
"moduleResolution": "node16"
option set, trying to importconsola
or a subpath (e.g.,consola/utils
) causes compilation/type checking to fail with the following error:The following patch resolves the issue so that the consumer isn't forced to apply the
"type": "module"
suggestion or change"moduleResolution": "node16"
(based on the Masquerading as ESM document and checkingattw --pack .
):If that works, I'd love to submit a PR for the patch!
Additional context
I encountered this issue in a discord bot project scaffolded with
npx @sapphire/cli new
.Logs
The text was updated successfully, but these errors were encountered: