-
Notifications
You must be signed in to change notification settings - Fork 7
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
Declaration file not found with Node16
module + moduleResolution
#30
Comments
WorkaroundIt seems that duplicating Alternative solutionMaybe using the |
Hi @karlhorky! Thanks for recreating this :) It seems that I'll keep this issue open until then. |
Ok, although I'm not sure if that's the best solution, since @andrewbranch also mentioned over here that also providing |
Still related to Typescript 4.7+, what am I missing? I'm just saying I haven't updated to 4.7+ (and 5.0 is in beta, which I won't migrate to any time soon). |
What I mean here is that other users may be using versions newer than the version of TypeScript that is used internally in a library. And these newer versions should be supported, even if the library itself does not internally use this newer version yet. |
I think my suggestion above of duplicating the |
Give this a try, if you want: https://www.npmjs.com/package/highlight-words/v/1.2.2-beta.0. The problem is...the tsc error goes away, but you still don't have declarations. It will complain So still working on it, but it's not a priority right now. |
Oh nice, thanks! Just took a look, did you mean to also publish the I don't see it in the unpkg file explorer for |
Nope, but in
which should do the same thing, as far as I understood. |
It’s not the same thing—see the explanation under “Types are CJS, but implementation is ESM” at https://github.com/arethetypeswrong/arethetypeswrong.github.io. |
Thanks both! I must admit, I am not familiar with all these since I can't dedicate 100% of my time to it - day job and all you know. Give highlight-words@1.2.2-beta.1 a try though. |
I guess we should leave this issue open until there's a non-beta version published? |
Hi @tricinel 👋 Happy new year! Hope you are well.
I have been experimenting with the
"module": "Node16"
option intsconfig.json
recently and found the declaration file forhighlight-words
cannot be found when using these options:Demo on StackBlitz (run
yarn tsc
in the terminal to get the error):https://stackblitz.com/edit/node-gwywi8?file=package.json,tsconfig.json,yarn.lock
Error
The error message:
Code
tsconfig.json
package.json
index.ts
The text was updated successfully, but these errors were encountered: