Fix for 'Content' Export Error After Latest Update in Nuxt Setup

Dear Prismic Community,

I wanted to share an issue and its solution that I encountered after updating to the latest Prismic SliceMachine (1.21.1) release in my Nuxt.js setup. I noticed some errors with my older slices. Specifically, the error read: "... does not provide an export named 'Content'."

Upon investigation, I realized that this is likely a common issue that others might also face, so I thought it best to mention it here.

The Solution: The problem stems from the import statement used in the older versions of slices. In previous versions, the import statement did not include a 'type import' declaration, which is now required.

To resolve this error, you should update your import statement as follows:

import { type Content } from "@prismicio/client";

I hope this helps anyone who might be facing the same issue. Happy coding, and enjoy the power of Prismic with your Nuxt projects!

Best regards,
Ton

2 Likes

Thanks for sharing Ton :slight_smile: and welcome to the community!