Generate: [error] Cannot read property 'data' of undefined

Hello,

I have a problem with the apiOptions.routes in the Prismic module.

In our project we have childeren under expertises which has a child that has a different layout called data-en-customer-intelligence (DCI). The first part of the DCI page has data which gets picked up by /services/expertises/:uid and ends up generating an error in the build and outputting a page without content.

Running "@nuxtjs/prismic": "^1.2.4",

nuxt.config.js

prismic: {
	...
	apiOptions: {
		routes: [
			...
			{
				type: 'expertise',
				path: '/services/expertises/:uid',
			},
			{
				type: 'expertise_dci',
				path: '/services/expertises/data-en-customer-intelligence/:uid',
			},
		],
	},
},

Hi Max,

I'm not quite sure how the page giving the error Cannot read property 'data' of undefined could be related to the route resolver in this case. Can you explain further or better yet share the code for the page which is not building correctly?

Thanks.

This issue has been closed due to inactivity. Flag to reopen.