The inferred type of 'loader' cannot be named without a reference to '.pnpm/@remix-run+server-runtime@2.10.2_typescript@5.5.3/node_modules/@remix-run/server-runtime/dist/single-fetch'. This is likely not portable. A type annotation is necessary.ts(2742)
The inferred type of 'loader' cannot be named without a reference to '.pnpm/react-router@6.24.1_react@19.0.0-rc-f994737d14-20240522/node_modules/react-router'. This is likely not portable. A type annotation is necessary.ts(2742)
This may be due to pnpm's strict dependencies isolation.
Reproduction
Install packages with
pnpm
Try using the new
defineLoader
from unstable fetch.make sure to add
to
tsconfig.json
System Info
Used Package Manager
pnpm
Expected Behavior
The code to work correctly
Actual Behavior
I get the following typescript errors:
This may be due to pnpm's strict dependencies isolation.