Slice zone empty after slicezone upgrade

I'm using Prismic in a next.js project. I updated to the latest version of slice zone and noticed in the documentation that we should be using these now:

  • @prismicio/client is responsible for fetching data from the Prismic API
  • @prismicio/react renders data from Prismic as React components
  • @prismicio/next enables previewing functionality
  • slice-machine-ui is a local development environment for building Slices
  • @prismicio/slice-simulator-react provides an environment to simulate Slices as you build them

I installed the ones I didn't already have and removed next-slicezone, then I noticed that slices/index.js looks a little different when I start a new project from scratch. Seems like it now exports a components object that contains all the slices. I updated my slices/index.js file to match this pattern.

However, now when I start up the slice machine, it says I have no custom types... How can I fix this? Do I need to remove my .slicemachine folder and sync it with Prismic somehow? What's the upgrade path? I'm stuck.

Also, when I start up the slicezone it says my framework is "previousNext"... what does that mean?

Nevermind, I figured it out. I tried to run the @slicemachine/init npm package while I was trying to upgrade and it reset a lot of my settings. I'm still confused where I would have found documentation on this update.

Hello @rieraspotlight

Thanks for reaching out to us.

I am glad that you have figured it out, and it's working for you. You can find documentation in Next.js setup article.

Let us know if you have any questions.

Thanks,
Priyanka