Skip to content
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

Fix "Cannot find module 'date-fns/types' ..." #5020

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

Svish
Copy link
Contributor

@Svish Svish commented Jul 31, 2024

Description

Problem

Upgraded to react-datepicker@7 and date-fns@3, and now getting the following error when checking types with typescript@5.5:

node_modules/react-datepicker/dist/calendar.d.ts:10:26 - error TS2307: Cannot find module 'date-fns/types' or its corresponding type declarations.

10 import type { Day } from "date-fns/types";
                            ~~~~~~~~~~~~~~~~


Found 1 error in node_modules/react-datepicker/dist/calendar.d.ts:10

Changes

Simply corrected the import from date-fns/types to date-fns.

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!

What to expect from this code review:
  • Comments posted to any areas of potential concern or improvement.
  • Detailed feedback or actions needed to resolve issues that are found.
  • Turnaround times vary, but we aim to be swift.

@Svish you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PullRequest Breakdown

Reviewable lines of change

+ 1
- 1

100% TSX

Type of change

Fix - These changes are likely to be fixing a bug or issue.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good from my perspective. No blocking concerns here!

Image of Jonah Jonah


Reviewed with ❤️ by PullRequest

@Svish
Copy link
Contributor Author

Svish commented Jul 31, 2024

Um... really don't understand why my type fix should cause the tests to fail here... looks suspiciously like a flaky date related test of some sort? 🤔

@martijnrusschen
Copy link
Member

yes there seems to be an issue with one of the tests around the end of the month.

@Svish
Copy link
Contributor Author

Svish commented Jul 31, 2024

yes there seems to be an issue with one of the tests around the end of the month.

Can I rerun it tomorrow somehow? Can't find a button for it anywhere, but maybe there isn't any for me without a kid of access to this project.

@martijnrusschen
Copy link
Member

yes I'll rerun is tomorrow or try fix it tonight if I can find time.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a trivial change, so it LGTM as long as CI is passing.

Image of Jacob Jacob


Reviewed with ❤️ by PullRequest

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to inactivity, PullRequest has cancelled this review job. You can reactivate the code review job from the PullRequest dashboard.

@Svish
Copy link
Contributor Author

Svish commented Aug 15, 2024

@martijnrusschen Any news on this? Tests still broken maybe?

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.50%. Comparing base (be3740d) to head (8b045f5).
Report is 59 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5020      +/-   ##
==========================================
- Coverage   96.53%   96.50%   -0.03%     
==========================================
  Files          29       29              
  Lines        3343     3343              
  Branches     1398     1398              
==========================================
- Hits         3227     3226       -1     
- Misses        116      117       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martijnrusschen martijnrusschen merged commit 9a8a4bd into Hacker0x01:main Aug 28, 2024
5 of 6 checks passed
@Svish Svish deleted the patch-1 branch August 29, 2024 12:31
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 this pull request may close these issues.

2 participants