-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Update package.json - add types to exports #677
Conversation
when changing moduleResolution from node to bundler (as in https://github.com/vercel/next.js/pull/51957/files#diff-066cacecd32e0ca72d47360ddb35c19a676835816eed05163e05564ec0874590)in tsconfig.json following errors occurs: ./pages/sitemap.xml/index.tsx:2:36 Type error: Could not find a declaration file for module 'next-sitemap'. 'C:/dev/frontend/project/node_modules/next-sitemap/dist/esm/index.js' implicitly has an 'any' type. There are types at 'C:/dev/frontend/project/node_modules/next-sitemap/dist/@types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'next-sitemap' library may need to update its package.json or typings. 1 | import type { GetServerSideProps } from "next"; > 2 | import type { ISitemapField } from "next-sitemap"; The error can be fixed via copying the types to the exports "." section in package.json (as described here: https://stackoverflow.com/a/76212193/1548552)
Someone is attempting to deploy a commit to a Personal Account owned by @iamvishnusankar on Vercel. @iamvishnusankar first needs to authorize it. |
This is much needed, when should we see the updated one? |
Hi, |
we need this asap as the site is suffering from this issue |
Any update on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Barokai Thanks for this PR. Approved
Update package.json - add types to exports
when changing moduleResolution from
node
tobundler
(as in https://github.com/vercel/next.js/pull/51957/files#diff-066cacecd32e0ca72d47360ddb35c19a676835816eed05163e05564ec0874590) in tsconfig.json, the following errors occur during build:The error can be fixed by copying the types to the exports "." section in package.json (as described here: https://stackoverflow.com/a/76212193/1548552)