A developer-friendly CMS backend
Questions tagged [prismic.io]
178 questions
0
votes
1 answer
How to fetch data using App Routes from NextJS and Prismic? I'm currently only being able to render uid fields
I'm using Prismic and NextJS. After reading their documentation on how to fetch data using the new App folder, I created this src/[uid]/page.jsx file
import { createClient } from "@/prismicio";
export default async function Page({ params }) {
…

SnooDucks299792
- 163
- 1
- 1
- 11
0
votes
1 answer
NextJs Fetch Data from Prismic blocked by CORS
I want to fetch and display lists of my content on simple blog. But when I run the code, it always says that my request has been blocked by a CORS.
I'm even lost because I just want to see the data displayed.
This is my code.
import { createClient }…

Iroro
- 39
- 5
0
votes
0 answers
Module ‘”@prismicio/client”’ has no exported member ‘Content’ error on build on Vercel
I am on a Next.js project and when I run npm run build, I don't get any errors, but when my project is trying to get built on Vercel, I get the following error:
Module '"@prismicio/client"' has no exported member 'Content'
This error is odd because…

zeckdude
- 15,877
- 43
- 139
- 187
0
votes
0 answers
How can I connect to multiple Prismic repositories in a Next.js project?
I am working with an existing Next.js project that is connected to a repo using the following package versions:
"@prismicio/client": "^6.0.0",
"@prismicio/helpers": "^2.3.9",
"@prismicio/next": "^1.0.3",
"@prismicio/react": "^2.0.0",
I am tasked…

zeckdude
- 15,877
- 43
- 139
- 187
0
votes
0 answers
Emiting values to slice-zone Prismic
Im using Nuxtjs2 with prismic slicemachine.
I have recently learned that you can pass down custom props to slices in the slice-zone by using :context="yourData" as a prop.
From these slices i want to emit data back up to the parent component…

Erik Albinsson
- 1
- 1
0
votes
1 answer
npx @slicemachine/init@latest gives triggerUncaughtException
I am creating an app with Prismic and NextJS . I created a NextJs app using npx create-next-app next-prismic . After that I made no changes and ran npx @slicemachine/init@latest .I also tried with version @1.1.17 and @1.1.16 but same error. This is…

Sushant
- 123
- 8
0
votes
0 answers
Prismic query predicates misinterpreting timestamp field type
I am trying to query my data using my custom field of type Timestamp (created using Slicemachine). I can see that field is also defined as type Timestamp in index.json under /customtypes/mycustomtype/.
"end_date": {
"type":…

shimon001
- 733
- 9
- 24
0
votes
0 answers
Cannot deploy website when .env files are not tracked by git
I have a website made with Gatsby 4. The content is coming from Prismic CMS.
I have uploaded the code on GitHub and deployed on Netlify and everything was working.
Then, I noticed my .env files (.env.development and .env.production) where being…

Alice
- 49
- 6
0
votes
1 answer
Not sure how to debug `uid: prismicDocument.uid ?? void 0` with Prismic and Next.js site
I have a Next.js project that uses the Prismic CMS, and the site works locally just fine, but recently someone changed some copy in a document and that's resulting in the following Traceback in the production builds:
2:42:19 PM:…

Cassidy
- 3,328
- 5
- 39
- 76
0
votes
0 answers
NextJs + Prismic Slice machine: throws an error in the console when trying to open a Custom type in Slice machine
I encountered this problem 2 times, for the first one, I had to delete the Custom type called "Page" then recreate it.
Reproduction action:
1/ Start the local project with yarn dev
2/ Start the Slice machine with the command npm run slicemachine
3/…

TOVONIAINA ARISTIDE
- 39
- 5
0
votes
0 answers
PrismicRichText not displaying anything
I have the following barebones component:
…
{{ blog.title[0].text }}

Bowis
- 541
- 8
- 31
0
votes
0 answers
unable to synchronise (copy) content from Staging to Production in Prismic
We are ready to go live as the production environment is ready now! But I struggle to find the “synchronise” button in our Prod > setting so that we can copy our content from Staging over to Prod. There’s an export / import button instead.
How can…

P JC
- 1
0
votes
0 answers
How can I use cloudfront to have images hosted by prismic come from my own domain?
I am using prismic headless CMS which hosts images on its own cdn.
Images have a name that is not SEO friendly and they are hosted on an external domain.
Prismic does not offer a way to set up a custom domain for images.
Our website also uses…

Sébastien
- 5,263
- 11
- 55
- 116
0
votes
1 answer
what field should I use for inline svg?
Example:
I'm trying to model this in prismic, but I don't know how to add this arrow icon, I know I can add an image but I don't want to because I want to add inline svg, any idea how to handle this ?
should i just add 2 fields for the text and…

Taste of Leaving
- 304
- 2
- 20
0
votes
2 answers
getStatic Path not working for base URL "/" in NextJS
I'm using Prismic and NextJS for the first time.
What I'm trying to is make it so when the user goes to the base url for the page localhost:3000/ in dev something will load. /About and /Pricing are working fine the base url doesn't work.
import {…

Some Guy Trying To Do Math
- 466
- 3
- 16