Questions tagged [prismic.io]

A developer-friendly CMS backend

Home page

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…
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/…
0
votes
0 answers

PrismicRichText not displaying anything

I have the following barebones component: