-
Notifications
You must be signed in to change notification settings - Fork 6
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
@grammyjs/types doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" in package.json or an .mjs extension for the entry point)
#23
Comments
Can you share how to reproduce this? |
I don't really see how this can be fixed. This package is meant to be empty, it contains 0 bytes of executable code. There is nothing wrong here, so there is nothing that we can do to fix it. It seems like Astro seems to assume that such packages are invalid. IMO this assumption is incorrect. Perhaps you should open an issue for Astro and tell them that this warning is reported incorrectly. Perhaps there is a way to suppress such warnings. I will close this now as there is nothing to do here. Please comment if the astro authors disagree and can come up with any ideas that can be improved about this repo. |
Thanks for looking into it. I searched around a bit on GitHub issues and found out it's a Vite thing. The solution is very simple though. |
Oh wow. Feel free to open a pull request that adds such a comment to |
@KnorpelSenf Hi, I just checked the latest release of this package, and the comments are not present in the |
Looks like a TypeScript bug. deno2node forces the option off. |
Maybe setting that option explicitly in this project's tsconfig would do the trick!? |
That'd change nothing. What about adding |
We'd have to experiment with this. Why are JSDoc string kept but |
@KnorpelSenf I'm not sure how to experiment with this package. I've never used deno in a local environment. Can you please write a build instruction? |
Yes, I should add that to the README, you're right. Just run It's easier to install Deno tooling. There's a VSCode extension for Deno. Run |
I found the problem. Please review #26. |
Update your deps and it will be fixed |
Yes! Just tested it. No more warning! Thanks a lot. |
Version: 3.0.3
I'm getting this warning in an Astro project that uses Vite under the hood.
I think the solution might be to add an empty export to the
mod.js
file so that it can be detected as Common JS module in Vite.The text was updated successfully, but these errors were encountered: