79498365

Date: 2025-03-10 14:58:43
Score: 0.5
Natty:
Report link

Similar to the problem the guy faced i faced the issue with next/navigation package, it would give me cannot find module or its corresponding types,

what worked for me was giving it the extension '.js'

whilst importing you can just type import and any function name VS code will give a suggestion from where you want to import the function. Just look at the extension and add it at the end of the import statement.

import { useRouter, useSearchParams } from "next/navigation.js";

Reasons:
  • Whitelisted phrase (-1): worked for me
  • No code block (0.5):
  • Low reputation (1):
Posted by: Moksh Jain