Questions tagged [sanity]

Sanity is a structured content platform and API that also offers an open source, React-based Studio that functions as like a headless CMS on top of the Sanity APIs.

Sanity treats content as structured data and makes it easily available over an API. The collaborative editor, called the Content Studio, is a fully customizable, client-side web application. Documentation here.

833 questions
-1
votes
2 answers

Vercel Build deply error: npm ERR! ERESOLVE unable to resolve dependency tree - While resolving: mocha-store@0.1.0

[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] Running "vercel build" [20:19:36.972] Vercel CLI…
-1
votes
1 answer

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 a configuration file called 'sanity.js', that's…
Caio b .
  • 15
  • 4
-1
votes
1 answer

Next.js reference error "client" is not defined

I am having an error when trying to fetch product data from sanity with getStaticPaths here is my code: import React, { useState } from "react"; function ProductPage({ product, products }) { const { image, name, details, price } = product; return…
Htet Ah Yan
  • 33
  • 1
  • 3
-1
votes
3 answers

React and Sanity not work google authentication

I make a React and Sanity project. But can't authentication with Google. How solve this secure way? (and not with "chewing gum") I get the following message: Uncaught TypeError: Cannot destructure property 'name' of 'response.profileObj' as it is…
Milán Nikolics
  • 503
  • 2
  • 5
  • 23
-1
votes
2 answers

How can I avoid prop drilling with a headless CMS? The context API I think hurts SEO

I want to use a headless CMO in my NextJs app (e.g. Sanity.io). The content is especially important for SEO. If I see it correctly, I can only receive the data on page-level via getStaticProps server-side to pre-render it that way (important for…
Manuel
  • 23
  • 4
-1
votes
1 answer

Can't fetch item from current slug content- Sanity/Next.js

I'm trying to get the set_name from the set schema that is associated to the current slug. *[_type == 'set']{set_name, slug} is how the schema looks. I'm not getting the set_name when I click on the slug however, and my console isn't showing any…
paparonnie
  • 170
  • 8
-1
votes
1 answer

How to get all the params values in getStaticProps

I am trying to figure out a way to map both slugs and paths in order to get all their values in the params : This is my code : export async function getStaticPaths() { const slugs = await client.fetch( `*[_type == "comic" &&…
-1
votes
1 answer

'Fetching is not a function'- Sanity

I'm getting the error message: Uncaught TypeError: _sanity_client__WEBPACK_IMPORTED_MODULE_2___default(...).fetch is not a function I can't figure out why. Its referencing line about.js:11:1 which is the sanityClient line, but when any changes I…
paparonnie
  • 170
  • 8
-1
votes
1 answer

How to display element from an array

In the below image there is an array given to me on doing console.log Array on doing console.log The name of the array is commentData if i do commentData.name i get the name but when i do commentData.replyoncomment.Rname or…
MIAN G
  • 9
  • 3
-1
votes
1 answer

how to arrange blog posts by categories in next-sanity

how to arrange blog post by categories in next-sanity. click to view what I meant to arrange All of my blogs in one line like category 1 category 1 blog, category 2 blog, category 3 blog i want them like category 1 category 1 blogs. category…
Mohid Naeem
  • 41
  • 1
  • 5
-1
votes
1 answer

I'm using Sanity for managing the database but I'm having a problem with displaying items on my website... here is the code

Why items are not displayed on my website? what did I do wrong guys? Can anyone help me or show me how to solve the issue in this block of code(index.js) import { client } from '../lib/client'; import {HeroBanner,FooterBanner, Product} from…
-1
votes
1 answer

what i give project output path

I run this command "npm install -g @sanity/cli && sanity init --template getting-started-pets --project abgfpdhd --dataset production --provider google" changed 1 package, and audited 2 packages in 16s found 0 vulnerabilities You're setting up a…
-1
votes
1 answer

getStaticProps/Paths getting "Application Error: A client-side exception has occurred"

Explanation Using this code to fetch a list of products, however I am receiving this error anytime I attempt to load a dynamic [product].js route? Can't figure out what is going wrong as I have the same setup for 2 other dynamic routes with the…
Mac Hooper
  • 105
  • 1
  • 8
-1
votes
1 answer

How to connect Sanity to React Native

I have been trying for ages to make Sanity work with React Native and It's not working out, read multiple documentations, followed many tutorials but no luck.... What am i doing wrong? Made a simple recreation…
Josef Pa
  • 39
  • 1
  • 8
-1
votes
1 answer

npm install -g @sanity/cli npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Program Files\Git\usr\local npm ERR! errno -4048

npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Program Files\Git\usr\local npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Git\usr\local' npm ERR! [Error: EPERM: operation not permitted,…
John
  • 1
1 2 3
55
56