You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the introduction of the generated wrangler config (#7442), some commands like wrangler pages dev|deploy require to be running in the correct working directory to be working as intended and reading generated wrangler config (or user config).
A global option like -C, --cwd in wrangler CLI can guarantee we can reliably run all commands in the project working directory without depending on the package manager monorepo features (which is not always possible).
Context: Nitro (and Nuxt) generates command hints after building for cloudflare pages. These commands are meant to be directly running in the user CLI and relative to where the build was issued for example:
$ <pm> nitro build path/to/project
✔ You can preview this build using npx wrangler pages dev path/to/project
✔ You can deploy this build using npx wrangler pages deploy path/to/project
Working on nitrojs/nitro#2949, noticed the above hint is not reliable because it won't use any of the wrangler configs from path/to/project
It is possible to manually point to the config path with -c, --config for modules in the example above but for pages, the only way is to somehow change CWD we need to show something like cd path/to/project && npx wrangler pages dev.
Quickly discussed with @petebacondarwin if we could make it a better DX from Wrangler CLI itself.
The text was updated successfully, but these errors were encountered:
Describe the solution
With the introduction of the generated wrangler config (#7442), some commands like
wrangler pages dev|deploy
require to be running in the correct working directory to be working as intended and reading generated wrangler config (or user config).A global option like
-C, --cwd
in wrangler CLI can guarantee we can reliably run all commands in the project working directory without depending on the package manager monorepo features (which is not always possible).Context: Nitro (and Nuxt) generates command hints after building for cloudflare pages. These commands are meant to be directly running in the user CLI and relative to where the build was issued for example:
Working on nitrojs/nitro#2949, noticed the above hint is not reliable because it won't use any of the wrangler configs from
path/to/project
It is possible to manually point to the config path with
-c, --config
for modules in the example above but for pages, the only way is to somehow change CWD we need to show something likecd path/to/project && npx wrangler pages dev
.Quickly discussed with @petebacondarwin if we could make it a better DX from Wrangler CLI itself.
The text was updated successfully, but these errors were encountered: