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

portal.d.ts is missing from package on npm with v7.4.0 #5129

Open
johansigfrids opened this issue Sep 26, 2024 · 0 comments
Open

portal.d.ts is missing from package on npm with v7.4.0 #5129

johansigfrids opened this issue Sep 26, 2024 · 0 comments

Comments

@johansigfrids
Copy link

The dist/portal.d.ts file with the type definitions for the portal.tsx file is missing from the package on npm.

I upgraded to v7.4.0 and ran tsc --noEmit to type check my project that uses react-datepicker. This gives the following type errors:

> tsc --noEmit

node_modules/react-datepicker/dist/index.d.ts:6:20 - error TS2307: Cannot find module './portal' or its corresponding type declarations.

6 import Portal from "./portal";
                     ~~~~~~~~~~

node_modules/react-datepicker/dist/popper_component.d.ts:2:20 - error TS2307: Cannot find module './portal' or its corresponding type declarations.

2 import Portal from "./portal";

Checking the node_modules/react-datepicker/dist/ folder I can confirm that the portal.d.ts file is not included.

Looking at my package-lock.json file the specific version I am using is:

    "node_modules/react-datepicker": {
      "version": "7.4.0",
      "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-7.4.0.tgz",
      "integrity": "sha512-vSSok4DTZ9/Os8O4HjZLxh4SZVFU6dQvoCX6mfbNdBqMsBBdzftrvMz0Nb4UUVVbgj9o8PfX84K3/31oPrTqmg==",
      "dependencies": {
        "@floating-ui/react": "^0.26.23",
        "clsx": "^2.1.1",
        "date-fns": "^3.6.0",
        "prop-types": "^15.8.1"
      },
      "peerDependencies": {
        "react": "^16.9.0 || ^17 || ^18",
        "react-dom": "^16.9.0 || ^17 || ^18"
      }
    },

I manually downloaded the https://registry.npmjs.org/react-datepicker/-/react-datepicker-7.4.0.tgz and poked around inside to verify the file is indeed missing.

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

No branches or pull requests

1 participant