I was working on my development branch, all was just working perfectly fine. When I merged the branch into preview, both branches stop compiling. Starting next dev, just is stuck on compiling. Only when remove anything Prismic, it compiles again. I am new to Prismic and overall I enjoyed it but if this breaks if you do simple merge, this is useable at all.
I tried reinitialise the slice machine but that only broke slice machine with the following error: Pulling existing types...
Error: Invalid context provided
Starting again might fix but this is not going to be safe for production if this just breaks when we merge our code.
I am using an NX monorepo, which has been one of the stumbling blocks with using Prismic. To get things working, I added a package.json file to the app/myapp folder. However, Netlify does not allow .lock files in any folder other than the root. This was one of the issues that caused the site to fail. Now, I'm experiencing strange issues, such as server functions occasionally failing on Netlify, and I'm no longer able to get previews in the CMS—I just receive an error message. Do you have any idea how to fix this? I removed the package.json and yarn.lock from apps/kids-guitar-dojo . Any idea why the preview is broken now?
Yes, here is final config if you use Clerk for authentication:
export const config = {
matcher: [
// Skip Next.js internals and all static files, unless found in search params
'/((?!_next|slice-simulator|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',
// Always run for API routes
'/(api|trpc)(.*)',
],
};
`