Closed crazycodestar closed 1 month ago
This is a serious issue with the nextjs integration, i have been battling with it as well for the past 10hours, the solution is to move your sanity.config.* file into your sanity folder and switch all imports to sanity for piece of mind. essentially do not use next-sanity
All I've done is follow the installation guide to integrate sanity into Nextjs
npx create sanity@latest
. But when I go to theclient.ts
file. it shows an errorCannot find module 'next-sanity' or its corresponding type declarations.
on theimport { createClient } from "next-sanity"
.Edit: I should also not that it would work like the package is still installed, if anyone was wondering