.vercelignore file?
I have published many sites on Pages using the next-on-pages tool. In the past, my projects only contained the Next.js app and nothing else.
This week, I'm trying to set up a site that includes the Next.js app but also a Sanity.io studio install. The project can be used to build the Next.js project and run Sanity Studio for authors.
Sanity Studio keeps a set of key schema files in a directory called
The problem:
Running
Attempted (and failed) fixes:
This week, I'm trying to set up a site that includes the Next.js app but also a Sanity.io studio install. The project can be used to build the Next.js project and run Sanity Studio for authors.
Sanity Studio keeps a set of key schema files in a directory called
schema. This directory is not needed for building the Next.js project and can/should be ignored by Next.js or next-on-pages activity.The problem:
Running
npx @cloudflare/next-on-pages@1 results in a type error for the Sanity schema that blocks the build.Attempted (and failed) fixes:
- Hide the folder with the offending files by renaming
/schemato/.schema. - Add a
.vercelignorefile withschemaas the lone entry. - Add
schemato thetsconfig.jsonfile in the project to exclude the directory from type checking. - Added
schemato the.gitignoreas a test (this won't be acceptable as a solution) but that also failed. - Experimented with
to see if there's a way to do it there, but I don't think that runs on prod builds anyhow so..../shrugwrangler.toml - Tried all of the above at the same time, just in case...but no joy.