npx shopify hydrogen deployでエラー

npx shopify hydrogen deploy
上記実行後、

Failed performing the deployment to Oxygen
というエラーが発生し、デプロイできない状況です。

以下、デプロイ時のログです。

% npx shopify hydrogen deploy
? Select an environment to deploy to:
Preview (handle: preview)

Building project...
vite v5.4.9 building for production...
84 modules transformed.
dist/client/.vite/manifest.json 0.96 kB │ gzip: 0.30 kB
dist/client/assets/(_locale)._index-B4Jyh5UW.js 0.24 kB │ gzip: 0.20 kB
dist/client/assets/root-DltM8yYA.js 1.26 kB │ gzip: 0.75 kB
dist/client/assets/entry.client-BK1X4PNR.js 3.70 kB │ gzip: 1.40 kB
dist/client/assets/components-DK67HtkH.js 253.83 kB │ gzip: 81.69 kB
built in 549ms

vite v5.4.9 building SSR bundle for production...
85 modules transformed.
dist/server/.vite/manifest.json 0.34 kB
dist/server/metafile.server.json 38.44 kB
dist/server/server-bundle-analyzer.html 104.67 kB
dist/server/index.js 261.68 kB │ map: 1,008.53 kB
built in 517ms
│
├ node_modules/react/cjs/react.production.min.js 7.2kb 2.8%
├ node_modules/scheduler/cjs/scheduler.production.min.js 3.7kb 1.5%
├ node_modules/react/cjs/react-jsx-runtime.production.min.js 677b 0.3%
├ server.tsx 210b 0.1%
├ node_modules/react/jsx-runtime.js 92b 0.0%
├ node_modules/scheduler/index.js 83b 0.0%
└ node_modules/react/index.js 67b 0.0%

│
└─── Complete analysis: file:///xxxxx/dist/server/server-bundle-analyzer.html ( file:///xxxxx/dist/server/server-bundle-analyzer.html )

Heads up: Shopify stores have a number of standard routes that aren’t set up yet.
Some functionality and backlinks might not work as expected until these are created or redirects are set up.
This build is missing 13 routes. For more details, run `npx shopify hydrogen check routes`.

Deploying to Oxygen..

Deployment failed, error: Failed performing the deployment to Oxygen
╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Failed performing the deployment to Oxygen │
│ │
│ Retrying the deployment may succeed. │
│ │
│ Next steps │
│ If the issue persists, please check the Shopify status page [1] for any known issues. │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
[1] https://status.shopify.com/

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Verifying deployment has been completed ...

どういう内容のエラーでしょうか?

こんにちは!

ログを見ただけだと具体的に何が原因で失敗しているか特定することはできませんが、

Retrying the deployment may succeed.   

と再度デプロイを試すことで成功する場合がある旨のメッセージがありますね。

また、

If the issue persists, please check the Shopify status page [1] for any known issues.

とあるので一時的にShopify側のシステムが不安定になっている可能性も考えられます。

  • 何度デプロイを試しても失敗する
  • Shopify側のシステムが安定稼働している

上記2点が確認できた場合は接続先ストアの権限の問題やOxygenの設定が考えられるので、そちらを確認していただくのがいい気がします。

それでも解決しない場合は、

npx clear-npx-cache

でキャッシュクリアする、別環境(ストア)で再現するか確認する、https://github.com/Shopify/hydrogen の issue にあげて回答を待つ、とかですかね!

以下で、「Oxygen はスターター プランや開発ストアでは利用できません。」との記述を見つけました。

https://shopify.dev/docs/storefronts/headless/hydrogen/fundamentals#oxygen

開発ストアで試していたので、それが原因かもしれません。

ローカル環境で開発進めた方が良さそうです。

ありがとうございました。