Issue with Cloudflare Pages Deployment for Monorepo Projects

Feedback

Current Behavior

When using the “Share application” button on the dashboard to deploy a repository, the following issues occur:

  1. For Monorepo projects (e.g. https://github.com/enpitsuLin/skland-daily-attendance), the deployment fails with the error:

    “Could not find a wrangler.json, wrangler.jsonc, or wrangler.toml file in the provided directory.”

  2. However, when manually forking the repository and importing it (or importing a self-owned repository) with the Root directory set to /apps/cloudflare, the deployment works successfully without checking for wrangler configuration files in the root directory.

Questions

  1. Is a wrangler configuration file in the root directory a mandatory requirement for repository imports?
  2. How can we achieve the same successful deployment using the deploy button?
    • Should we skip the wrangler.jsonc check?
    • Or would it make more sense to perform the check after setting the Root directory?

Suggested Improvement

The deployment process should be more flexible to accommodate Monorepo structures by:

  1. Allowing users to specify the Root directory before checking for configuration files
  2. Or implementing a more intelligent configuration file detection that can traverse subdirectories
1 Like

I’m also looking for a solution for this. The documentation says you can specify the sub-data tree but don’t mention the exact query parents that Cloudflare expect.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.