Skip to content

build: Verify exports in package.json #2533

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

Closed
4 tasks
gpbl opened this issue Oct 11, 2024 · 5 comments · Fixed by #2535
Closed
4 tasks

build: Verify exports in package.json #2533

gpbl opened this issue Oct 11, 2024 · 5 comments · Fixed by #2535
Assignees

Comments

@gpbl
Copy link
Owner

gpbl commented Oct 11, 2024

We are receiving some reports (e.g. #2521), about exports not being correctly interpreted by some bundler:

https://arethetypeswrong.github.io/?p=react-day-picker%409.1.3

Problems

  • Resolution failed
    Import failed to resolve to type declarations or JavaScript files.
  • ESM (dynamic import only)
    A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use a dynamic import.
  • Used fallback condition
    Import resolved to types through a conditional package.json export, but only after failing to resolve through an earlier condition. This behavior is a TypeScript bug. It may misrepresent the runtime behavior of this import and should not be relied upon.
  • Internal resolution error
    Import found in a type declaration file failed to resolve. Either this indicates that runtime resolution errors will occur, or (more likely) the types misrepresent the contents of the JavaScript files.
    Expand the raw details below to see the imports that failed to resolve.
@Sandip-Z
Copy link

I am still having this issue after updating to v9.1.4

@JamersonAguiarOSF
Copy link

Still having the issue also

@gpbl
Copy link
Owner Author

gpbl commented Oct 21, 2024

Hi @Sandip-Z @JamersonAguiarOSF

Please help by reproducing your problem on CodeSandbox or StackBlitz and then create a new issue.

Thanks!

@khinshankhan
Copy link

This may be irrelevant but I found that my jest tests couldn't import the stylesheets. Using identity-obj-proxy as guided in this stackoverflow answer worked.

Just commenting in case someone else ends up here while searching the exact error like I did 😅

@JamersonAguiarOSF
Copy link

This may be irrelevant but I found that my jest tests couldn't import the stylesheets. Using identity-obj-proxy as guided in this stackoverflow answer worked.

Just commenting in case someone else ends up here while searching the exact error like I did 😅

I'll give it a try, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants