Skip to content

🐛 BUG: Please use "pages_build_output_dir" to specify the directory of static files to upload #5711

Description

@kurdin

Which Cloudflare product(s) does this pertain to?

Pages

What version(s) of the tool(s) are you using?

3.52.0 wrangler

What version of Node are you using?

20.x

What operating system and version are you using?

Mac Latest

Describe the Bug

Observed behavior

When I run
$ wrangler pages deploy pages/
I see the message

[WARNING] Pages now has wrangler.toml support.
  We detected a configuration file at
   wrangler.toml but it is missing the
  "pages_build_output_dir" field, required by Pages.
  If you would like to use this configuration file to deploy your project, please use
  "pages_build_output_dir" to specify the directory of static files to upload.
  Ignoring configuration file for now, and proceeding with project deploy.

in result all configuration in wrangler.toml is ignored on deployment
but I did specify pages/ directory using cli

Expected behavior

Wrangler should not complain about missing pages_build_output_dir if that output directory provided with cli command wrangler pages deploy pages/ , or at least it should not ignore all other configuration settings from wrangler.toml file on deployment.

If I added pages_build_output_dir to wrangler.toml this message will go away but I could not use cli command wrangler pages dev --proxy=5173 -- vite --port=5173 --strictPort in local development env

Please provide a link to a minimal reproduction

https://github.com/kurdin/wrangler-pages-deploy-output-dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions