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?

More than 1 year has passed since last update.

pnpmのバージョンを上げたらvercelのデプロイが失敗するようになったので対応したメモ

Last updated at Posted at 2023-05-29

概要

おしゃれリポジトリ駆動開発を試しているので、行ったことをQiitaに残していく。
vercelが失敗するようになっていたのが、おしゃれでないので直した。

発生していたエラー

pnpmのバージョンがvercelとローカルで異なっている模様。
lockfileを確認すると、vercelは6.0でローカルは6.1であった。

image.png

 ERROR  Command failed with exit code 1: /vercel/.pnpm-store/v3/tmp/dlx-96/node_modules/.bin/turbo-ignore
 ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  Broken lockfile: no entry for '/eslint/8.41.0' in pnpm-lock.yaml
This issue is probably caused by a badly resolved merge conflict.
To fix the lockfile, run 'pnpm install --no-frozen-lockfile'.
Error: Command "pnpm install" exited with 1
BUILD_UTILS_SPAWN_1: Command "pnpm install" exited with 1

対応

実験的な機能でpnpmのバージョン指定が可能なようなので、これを使用した。

vercel側の設定

実験的機能を有効化するために、環境変数を設定する。

image.png

リポジトリ側の設定

packageManagerでバージョンを指定する。ローカルでpnpm -vで確認したバージョンを入れた。

コミット

{
  "repository": "https://github.com/hibohiboo/RinneCircle.git",
  "license": "MIT",
  "private": true,
  "workspaces": [
    "apps/*",
    "packages/*"
  ],
  "scripts": {
    "build": "turbo run build",
    "dev": "turbo run dev",
    "start": "turbo run start",
    "lint": "turbo run lint",
    "clean": "turbo run clean",
    "ncu": "npx pnpm up"
  },
  "devDependencies": {
    "eslint": "^8.41.0",
    "eslint-config-turbo": "latest",
    "turbo": "^1.9.9"
  },
+  "packageManager": "pnpm@8.6.0"
}

設定後動作確認

グリーン!

image.png

おしゃれリポジトリでその他やったこと

  • 英語でReadme
    日本語がないと自分が不安なので日本語も追加している。別ファイルにわけたほうがいいかなl
  • og:imageの設定
    image.png

参考

個人開発のモチベを上げるおしゃれリポジトリ駆動開発
vercel

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?