0
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?

【Prisma】「The 'paths[1]' argument must be of type string」エラーが出た時の対処法

Last updated at Posted at 2026-01-23

はじめに

Prismaを使った開発中に、
「TypeError [ERR_INVALID_ARG_TYPE]: The 'paths[1]' argument must be of type string. Received undefined」
というエラーが発生しました。

発生したエラー内容

エラー(抜粋)

TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received undefined
clientVersion: '7.2.0'

※ログの clientVersion は Prisma Client のバージョンを示しています。

発生状況

  • pnpm run dev 実行時
  • Next.js/Prisma/monorepo環境

原因

  • package.json では "prisma": "^6.10.0" だが、生成済みの Prisma Client は 7系(7.2.0)で作られていた

解決方法

  • サーバーディレクトリで以下コマンドを実行し、Prisma Client を再生成する
# pnpm prisma generate
  • これで、現在のバージョンに合った Prisma Client が生成され、エラーが解消される

終わりに

  • 試しに Prisma 7系でビルドを試みましたが、エラーが発生してビルドできなかったため、現象の再現はできませんでした
  • なぜ Client が 7系になるのか分からない場合も、まずは pnpm prisma generate を試してみると良いかもしれません
0
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
0
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?