-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript error when using "moduleResolution": "node16"
#270
Comments
This change will need to be implemented in https://github.com/bevry/boundation which scaffolds the meta files across all bevry's projects. In my 15 years of working in the tech industry, I've probably only earned about 150k, so I have no desire to do this asap, as there is no ROI for me. A PR on boundation is welcome, which I can give publish access to the PR author. |
Boundation successfully updated this package and didn't encounter this error. Is it still a problem for you? |
Thanks for your efforts. Unfortunately, I no longer use TypeScript (I replaced it with Haxe), so I don't know if this problem is still present. But I suppose it is still here because I don't see the typings declared in the proper section of the "types": "./compiled-types/",
"exports": {
"node": {
"import": "./edition-es2019-esm/index.js",
"default": "./index.cjs",
"require": "./edition-es2022/index.js"
},
"browser": {
"import": "./edition-browsers/index.js"
}
}
"exports": {
"node": {
"types": "./compiled-types/",
"import": "./edition-es2019-esm/index.js",
"default": "./index.cjs",
"require": "./edition-es2022/index.js"
},
"browser": {
"types": "./compiled-types/",
"import": "./edition-browsers/index.js"
}
} |
Ahh okay, now I understand. I'll roll this out in my current batch of automation work. Thanks for bringing this to my attention. |
this should now be resolved with v8.2.0 shoutout to my GitHub Sponsors for affording me the time to make this happen |
I've recently switched from
"moduleResolution": "node"
to"moduleResolution": "node16"
in a project using this library. And I get TypeScript errors:It seems that when using
node16
module resolution, the typings located in thecompiled-types
folder are not loaded anymore by the TypeScript compiler.Cf. https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#package-json-exports-imports-and-self-referencing
I guess that when we use an
export
map in a library, we must also add atypes
property to this export map...Node.js 18.2.0, TypeScript 4.7.3,
istextorbinary
6.0.0.The text was updated successfully, but these errors were encountered: