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

Cannot find module "next/navigation" #368

Closed
mateogianolio opened this issue Oct 14, 2023 · 2 comments · Fixed by #369
Closed

Cannot find module "next/navigation" #368

mateogianolio opened this issue Oct 14, 2023 · 2 comments · Fixed by #369
Labels

Comments

@mateogianolio
Copy link
Contributor

Hey!

I'm having issues with the next/navigation import inside defs.ts. I can see that it was patched here so I assume defs.ts should be changed as well? :)

Here is the diff that temporarily solved my problem:

diff --git a/node_modules/next-usequerystate/dist/index.js b/node_modules/next-usequerystate/dist/index.js
index c15d5de..f59d8e8 100644
--- a/node_modules/next-usequerystate/dist/index.js
+++ b/node_modules/next-usequerystate/dist/index.js
@@ -94,7 +94,7 @@ import { useRouter as useRouter2, useSearchParams } from "next/navigation.js";
 import React from "react";
 
 // src/defs.ts
-import "next/navigation";
+import "next/navigation.js";
 
 // src/update-queue.ts
 var FLUSH_RATE_LIMIT_MS = 50;
@franky47
Copy link
Member

Ah, thanks! Would you like to open a PR?

@github-actions
Copy link

🎉 This issue has been resolved in version 1.8.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants