2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Error: The process '/opt/hostedtoolcache/node/24.17.0/x64/bin/npx' failed with exit code 1

2
Posted at

はじめに

VercelにCI/CDを実行しようと思い、github actionsにdeployするとエラーになりました。

問題

Next.jsアプリをVercelにデプロイする方法は以下の記事を参考にしました。

Vercelトークンの取得も行い、deployするか確認しました。
すると以下のエラーとなりました。

Run amondnet/vercel-action@v25
Error! Your Vercel CLI version is outdated. This endpoint requires version 47.2.2 or later. Please upgrade by running `npm i -g vercel@latest`.

Error! Your Vercel CLI version is outdated. This endpoint requires version 47.2.2 or later. Please upgrade by running `npm i -g vercel@latest`.
Error: The process '/opt/hostedtoolcache/node/24.17.0/x64/bin/npx' failed with exit code 1

解決方法

VercelのCLIが47以上にする必要があり、今の記載では不足していたのです。(内部だと25となっていました。)

- name: Deploy to Vercel
  uses: amondnet/vercel-action@v25

- name: Install Vercel CLI
  run: npm install --global vercel@latest

- name: Pull Vercel Environment
  run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
  env:
    VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
    VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

- name: Build Project Artifacts
  run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project
  run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

と記載を変更しました。

おわりに

つぎにいきます。

参考文献

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?