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-sanity' or its corresponding type declarations. #1656

Closed
crazycodestar opened this issue Sep 5, 2024 · 2 comments
Closed

Comments

@crazycodestar
Copy link

crazycodestar commented Sep 5, 2024

All I've done is follow the installation guide to integrate sanity into Nextjs npx create sanity@latest. But when I go to the client.ts file. it shows an error Cannot find module 'next-sanity' or its corresponding type declarations. on the import { createClient } from "next-sanity".

Edit: I should also not that it would work like the package is still installed, if anyone was wondering

@patrickaigbogun
Copy link

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

@stipsan
Copy link
Member

stipsan commented Oct 15, 2024

Hi, in order to help you we need you to provide a link to a github repository that demonstrates the problem.
You may fork one of our templates and alter it until it reproduces the problem.
Once you have that create a new issue and we'll jump right in and be able to assist.
Thanks!

@stipsan stipsan closed this as completed Oct 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants