Hello, we've got a super old Gatsby v2 site, where we want to add the preview functionality via gatsby-plugin-prismic-previews
. We are following this guide: Page Not Found - Prismic
Here are the relevant dependencies:
- "gatsby-plugin-prismic-previews": "^5.2.1",
- "gatsby-source-prismic": "^3.2.1",
- "gatsby": "^2.13.71",
We added the following config to gatsby-config.js
:
plugins: [
.....
{
resolve: "gatsby-plugin-prismic-previews",
options: {
repositoryName: `${process.env.repositoryName}`,
accessToken: `${process.env.API_KEY}`,
path: "/preview",
},
},
{
resolve: "gatsby-source-prismic",
options: {
repositoryName: ${process.env.repositoryName}`,
accessToken: `${process.env.API_KEY}`,
schemas: {
.... schemas that we copied from the custom types in prismic
},
},
},
............
When trying to build the app, we get the following error message:
gatsby-plugin-prismic-previews(XXXXX) - Type paths for this repository could not be found. Check that you have gatsby-source-prismic configured with the same repository name and type prefix (if used) in gatsby-config.js.
Any idea, how we can fix this? Is it event possible to get preview running with such an ancient system without updating to Gatsby v3?
Thanks.
Cheers