You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { CompatRouter } from "react-router-dom-v5-compat"
Run pnpm tsc.
Expected Behavior
pnpm tsc runs without errors.
Actual Behavior
node_modules/.pnpm/react-router-dom-v5-compat@6.16.0_react-dom@18.2.0_react-router-dom@5.3.4_react@18.2.0/node_modules/react-router-dom-v5-compat/dist/react-router-dom/dom.d.ts:1:71 - error TS2307: Cannot find module '@remix-run/router' or its corresponding type declarations.
1 import type { FormEncType, HTMLFormMethod, RelativeRoutingType } from "@remix-run/router";
~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/react-router-dom-v5-compat@6.16.0_react-dom@18.2.0_react-router-dom@5.3.4_react@18.2.0/node_modules/react-router-dom-v5-compat/dist/react-router-dom/index.d.ts:7:203 - error TS2307: Cannot find module '@remix-run/router' or its corresponding type declarations.
7 import type { Fetcher, FormEncType, FormMethod, FutureConfig as RouterFutureConfig, GetScrollRestorationKeyFunction, History, HTMLFormMethod, HydrationState, Router as RemixRouter, V7_FormMethod } from "@remix-run/router";
~~~~~~~~~~~~~~~~~~~
Found 2 errors in 2 files.
The text was updated successfully, but these errors were encountered:
It's something that happens to work with npm's hoisting algorithm, but does not work with pnpm with hoist=false or with Yarn PnP (see "Ghost dependencies protection"), and may not even work with npm in the future depending on the outcome of npm/rfcs#287.
Packages should always declare dependencies for packages they directly require or import, and not rely on transitive dependencies getting hoisted.
What version of React Router are you using?
6.16.0
Steps to Reproduce
tsconfig.json:
index.ts:
Run
pnpm tsc
.Expected Behavior
pnpm tsc
runs without errors.Actual Behavior
The text was updated successfully, but these errors were encountered: