Hydrogen CLI Deploy Deployment Tokens Not Supported

Hydrogen CLI Deploy Deployment Tokens Not Supported

iamjho
Visitor
1 0 0

In which of these areas are you experiencing a problem?

Hydrogen custom storefront

Expected behavior

I expected the command shopify hydrogen deploy to deploy my branch to Oxygen when running the command with the SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN environment variable presented and populated without needing any user interaction.

Actual behavior

Even when providing a deployment token, the CLI prompts the user to log in to their Shopify account both from my local machine and my deployment CI in Gihub Actions, which is making my deployment CI fail. I tried instead to provide the token using the -t option but was given the error "Nonexistent flag: -t". The same happened with the long-form version of the option.

Verbose output

2024-09-10T00:42:33.048Z: Obtaining the dependency manager in directory ***...
2024-09-10T00:42:33.051Z:
Running system process:
· Command: ruby -v
· Working directory: ***

2024-09-10T00:42:33.055Z: Obtaining the dependency manager in directory ***...
2024-09-10T00:42:33.056Z:
Running system process:
· Command: ruby -v
· Working directory: ***

2024-09-10T00:42:33.290Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 226 ms
With response headers:

  • x-request-id: 66e082ef-ba38-4fed-8d55-71057e1f21bd

2024-09-10T00:42:33.291Z: Analytics event sent: {
"command": "hydrogen deploy",
"time_start": 1725928953027,
"time_end": 1725928953042,
"total_time": 15,
"success": false,
"cli_version": "3.49.2",
"ruby_version": "2.6.10",
"node_version": "22.8.0",
"is_employee": false,
"uname": "darwin arm64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": "["@shopify/cli","@shopify/cli-hydrogen","@shopify/plugin-did-you-mean"]",
"env_shell": "zsh",
"env_device_id": "87f2f3705d95aa1c5cfcdc33516e543d7399bffe",
"env_cloud": "localhost",
"env_package_manager": "npm",
"cmd_all_launcher": "npm",
"cmd_all_topic": "hydrogen",
"cmd_all_plugin": "@shopify/cli-hydrogen",
"args": "--token *** --verbose",
"error_message": "Nonexistent flags: --token, --verbose\nSee more help with --help",
"env_plugin_installed_all": "["@shopify/cli","@shopify/cli-hydrogen","@shopify/plugin-did-you-mean"]",
"metadata": "{"extraPublic":{},"extraSensitive":{}}"
}

Reproduction steps

Unfortunately, I cannot publicize my repository to provide a clone for reproduction but I'm simply running npx shopify hydrogen deploy. I have also tried installing the CLI with no change in result

Operating System

Mac OS Sonoma

Shopify CLI version (check your project's package.json if you're not sure)

3.66.1

Shell

zsh

Node version (run node -v if you're not sure)

v22.8.0

What language and version are you using in your application?

Node 22

Replies 0 (0)