Emdash CMS Deployment Command Context FAQ

Where to run Emdash CMS deployment commands across monorepo, template-derived, and standalone project layouts.

Where exactly should deployment commands be run?

Default rule: run commands from the target site project root.
If you are in the wrong directory, scripts, configs, and bindings often resolve to the wrong context.

What counts as the “target project root”?

It usually has all of the following:

  • project-specific package.json
  • site-specific astro.config.*
  • wrangler.jsonc (for Cloudflare flow)

If these three are present, you are likely in the correct deployment context.

How does this differ across monorepo, template copy, and standalone?

Standalone project

Most direct path: all commands are executed in one directory.

Template-derived project

First update project name, scripts, and bindings after copying from template; then run deployment commands.

Monorepo

Enter the specific app package before deploying. Do not run app deployment commands from monorepo root unless scripts explicitly proxy to that package.

What are the most common wrong-directory symptoms?

  • deployment script not found (exists in subdirectory)
  • wrangler.jsonc missing or wrong file loaded
  • binding name mismatch (config from another project is used)
  • build passes but deploy targets the wrong worker name

Most are context failures, not command syntax failures.

Quick 20-second preflight check

Before running deploy commands:

  1. Confirm pwd points to the expected project.
  2. Confirm package.json name matches target site.
  3. Confirm wrangler.jsonc names (name, D1, R2) match target environment.

This saves more time than repeated command retries.

Can I mix package managers?

Not recommended.
Use one package manager per deployment flow to avoid lockfile drift and dependency resolution mismatch.

Team practices to prevent context errors

Recommended controls:

  • document exact command directories in README
  • add preflight checks in critical scripts
  • add path-consistency checks in CI

Most deployment failures are not deep platform issues; they are unstated command context assumptions.

Useful command snippet

pwd
ls
npm run build
npm run deploy