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

[SIngleFetch 2.12.0] Cannot declare module "@remix-run/server-runtime" when using pnpm #9981

Closed
kesoji opened this issue Sep 12, 2024 · 4 comments · Fixed by #9982
Closed
Labels
awaiting release This issue has been fixed and will be released soon bug:unverified feat:single-fetch feat:typescript

Comments

@kesoji
Copy link

kesoji commented Sep 12, 2024

Reproduction

pnpm dlx create-remix@latest pnpm-test

System Info

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M2 Pro
    Memory: 49.34 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.7.0 - ~/.local/share/mise/installs/node/22/bin/node
    npm: 10.8.2 - ~/.local/share/mise/installs/node/22/bin/npm
    pnpm: 9.10.0 - ~/.local/share/mise/installs/node/22/bin/pnpm
    bun: 1.1.26 - ~/.local/share/mise/installs/bun/latest/bin/bun
  Browsers:
    Brave Browser: 117.1.58.127
    Chrome: 128.0.6613.137
    Safari: 17.6
  npmPackages:
    @remix-run/dev: ^2.12.0 => 2.12.0
    @remix-run/node: ^2.12.0 => 2.12.0
    @remix-run/react: ^2.12.0 => 2.12.0
    @remix-run/serve: ^2.12.0 => 2.12.0
    vite: ^5.1.0 => 5.4.4

Used Package Manager

pnpm

Expected Behavior

As changed in 2.12.0, we can declare and extend "@remix-run/server-runtime" and useLoaderData returns deserialized data (AWESOME!).

https://remix.run/docs/en/main/guides/single-fetch#enable-single-fetch-types

Actual Behavior

When using pnpm, server-runtime is missing in node_modules/@remix-run and failing to extend Future interface.
CleanShot 2024-09-13 at 08 03 22@2x

@brophdawg11
Copy link
Contributor

This is due to pnpm's added strictness over npm. For now, you can install @remix-run/server-runtime as a dependency and we'll be re-exporting this Future type through the other packages (@remix-run/node, @remix-run/cloudflare, etc) in the next release and you'll augment the interface through them.

@brophdawg11 brophdawg11 linked a pull request Sep 13, 2024 that will close this issue
@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label Sep 13, 2024
@kesoji
Copy link
Author

kesoji commented Sep 15, 2024

@brophdawg11 Thank you!!!

Copy link
Contributor

🤖 Hello there,

We just published version 2.12.1-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 2.12.1 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release This issue has been fixed and will be released soon bug:unverified feat:single-fetch feat:typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants