All Questions
29
questions
4
votes
0
answers
219
views
Getting fetch error when deploying Nextjs / TS app to Vercel
Im getting this error when I try to deploy an app using Nextjs / TS / Sanity to Vercel
18:39:44.458] Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/...
4
votes
1
answer
554
views
Vercel deployment: Error occurred prerendering page "/" TypeError: fetch failed
Yesterday I deployed my project (using Sanity.io) to Vercel and no issue.
Today I edited my code and want to deploy the new version with this commands:
vercel build
vercel deploy --prebuilt
vercel --...
3
votes
3
answers
901
views
Problem Deploying a Next JS + Sanity Project to Vercel
I was on a project and used nextjs with sanity but after almost finishing my project, I just don't see any way to deploy it. Learning sanity took quite a bit of time but what meaning is there if I can'...
2
votes
3
answers
5k
views
Vercel Build deply error: npm ERR! ERESOLVE unable to resolve dependency tree - While resolving: [email protected]
[20:19:35.061] Cloning github.com/oneboyfromife/macho-store (Branch: main, Commit: 48072bd)
[20:19:35.209] Previous build cache not available
[20:19:36.082] Cloning completed: 1.020s
[20:19:36.317] ...
2
votes
1
answer
745
views
Module '"sanity"' has no exported member 'defineConfig'
I've just finished working on a project using Next.js 13 and Sanity as a headless CMS. Here is the issue I'm experiencing:
When I run
vercel build
I get the error that 'sanity' has no exported member ...
2
votes
5
answers
2k
views
Sanity Deployment on Vercel Issue: Cannot find module 'sanity' even though package is installed
So i'm trying to deploy sanity/nextjs on vercel. It runs fine locally but for the production build I keep getting the same error.
Here's the main error:
> build
> next build
info - Linting and ...
2
votes
1
answer
459
views
Storing Sanity token as a secret with Now doesn't work
I am trying to store a Sanity token as a secret when deploying my project with Now, but it all doesn't seem to work. Here is my situation:
I added my Sanity token as a secret to the CLI (I called it ...
2
votes
1
answer
1k
views
Next.js page working on localhost but not on vercel
I'm building the blog for a website, and I just completed the search results page. When I tried it on localhost, it worked perfectly but when I deployed it to vercel it doesn't work at all. The ...
2
votes
2
answers
845
views
Vercel, Next.js, Sanity.io production deployment fails
I have a Next.js + Sanity.io project and when I deploy from local build using vercel CLI with
vercel build and then vercel deploy --prebuilt, it works great.
However, when I do vercel --prod to create ...
2
votes
1
answer
290
views
How to read/pass vercel system enviroment variables to code in Sanity?
I want to pass the VERCEL_GIT_COMMIT_REF variable to my javascript bundle. I've deployed Sanity in Vercel and it only passes variables with the prefix SANITY_STUDIO_.
So, I've created an environment ...
1
vote
2
answers
453
views
Vercel Build Error: It looks like you're using options meant for '@sanity/preview-kit/client'
Hi Im having an odd issue with Vercel deployment because of sanity, this is the Vercel build error:
Error: It looks like you're using options meant for '@sanity/preview-kit/client', such as '...
1
vote
1
answer
3k
views
"query" is not a valid Page export field - When Trying to deploy NextJS13 and Sanity.io to Vercel
I'm learning NextJS13 and was following a blog tutorial online by Sonny Sangha 'Let’s build a BLOG with Next.js 13 (Sanity v3, TypeScript, Tailwind CSS, Auth, CMS, Preview Mode)'. Upon completion of ...
1
vote
1
answer
573
views
Next.js app router + Sanity revalidateTag() issues
I’m trying to get next app router + revalidateTag() to work with Sanity but it’s either completely unpredictable or I totally misunderstood something.
I now spent 5 full days trying to make it work ...
1
vote
2
answers
1k
views
Bust cache after content change with Sanity?
I'm using Sanity as a CMS and Next JS as my frontend. I’d like my site to be able to handle a reasonable amount of traffic so I think I need some caching.
However if an editor makes a change to the ...
1
vote
4
answers
388
views
how can I reach my Sanity Studio under a sub route of my NextJs application?
How can I use Studio by Sanity v3 as a subroute in NextJs V13 if I have the following folder structure?
├── My Application
│ ├── pages
│ └── app
│ ├── src
│ └── studio
│ ├── schema
│ ...
1
vote
0
answers
289
views
Force Build Time Static Generation in Next.js 14.X
I have a blog built with Next.js 14.0.3 which calls a headless CMS API (Sanity) and I host it on Vercel. I've configured sanity to rebuild my site when I publish something new but I have run into ...
1
vote
0
answers
37
views
Pages updated with ISR on Next.js revert to old version when you press back button
We have set up a headless site with Sanity as CMS, using Next.js 13.1.1 running on Vercel.
After the site is built a user can update a page in Sanity, and using ISR (Incremental Static Regeneration) ...
1
vote
1
answer
249
views
Using custom list preview with prepare in sanity schema fails production build
I am fairly new with next.js, typescript and sanity, and so far everything was going fine. I have multiple schemas defined in my project and it runs fine in development. linting checks do not return ...
0
votes
2
answers
951
views
Type error: Argument of type '{ projectId: string | undefined; }' is not assignable to parameter of type 'SCL| SPD | undefined'
I'm trying to deploy my project to Vercel but it seems to be giving me this error saying the following:
Type error: Argument of type '{ dataset: string; projectId: string | undefined; apiVersion: ...
0
votes
0
answers
82
views
Next.js revalidation on slug page don't work
i'm using Next.js and Sanity as CMS. I have an author page [slug].tsx and i'm trying to revalidate this page by using an api like revalidate.ts.
The author page index can revalidate informations like ...
0
votes
0
answers
44
views
Nextjs and reactjs package.json error when deployinh on vercel. Any suggestions on how I should approach this problem?
Looks like I have a dependency compatibility problem or I have installed different versions of sanity/client. I have two package.json files. One is for frontend and other is for backend. Here's how ...
0
votes
0
answers
127
views
How to resolve error: Could not identify Next.js version, ensure it is defined as a project dependency
I'm trying to deploy my project to vercel but getting this error:
Warning: Could not identify Next.js version, ensure it is defined as a project dependency.
Error: No Next.js version could be detected ...
0
votes
0
answers
449
views
Error occurred prerendering page "/". TypeError: fetch failed
I am getting this error on command screen while running 'npm run build' but 'npm run dev' is running fine and because of this I am not able to deploy this project. I am using nextJS 13
Error occurred ...
0
votes
0
answers
256
views
Type error: Module '"sanity"' has no exported member 'defineConfig'
I have just finished working on a project using Next.js 13 and Sanity as a headless CMS. Here is the issue I'm experiencing:
When I run
vercel build
I get the error that 'sanity' has no exported ...
0
votes
0
answers
98
views
I'm trying to deploy my site to vercel but it kips giving this error [duplicate]
[15:37:42.508] Cloning github.com/Tomiwakukoyi/shopit (Branch: main, Commit: b447242)
[15:37:42.746] Previous build cache not available
[15:37:42.919] Cloning completed: 411.205ms
[15:37:43.019] ...
0
votes
1
answer
284
views
Sanity error on deployment using Vercel Type error: Module '"sanity"' has no exported member 'defineConfig'
Im am trying to deploy my app and Vercel screams that a module of sanity has no exported member. I ran my build as well in my terminal, same issue. I degraded & updated my sanity/client packages ...
0
votes
1
answer
4k
views
Astro JS problem with React component in production
I'm having some issues with Astro/React and rendering a component in production. I'm using react-youtube in a tsx component and then turning it into an .astro component before using that to render a ...
0
votes
2
answers
788
views
Vercel / Sanity deployment issue
Hey guys im trying to deploy my project.
I run Vercel Build through my terminal it comes back with no errors but when run vercel deploy I keep getting
Build Failed Command "npm run build" ...
-1
votes
1
answer
733
views
Configuration Files in Next.js
So, I have a functional application that is working fine, I', using Next.js and Next.js api tool to do all the requests. I'm using sanity.io for my backend. Thats all ok.
For my sanity config, I have ...