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?

Next.js 15でprismaのcreateを実行したら、TypeError: The "payload" argument must be of type object. Received null というエラーが出た際の解決策

Posted at

Next.js 15においてprismaで、DBにcreateしたら以下のようなエラーが発生した。
「TypeError: The "payload" argument must be of type object. Received null」

対応策

  1. node_modules/@prisma/client/runtime/library.jsの//# sourceMappingURL=library.js.mapを削除する
  2. npm install --save patch-packageを実行して、patch-packageを導入する
  3. npx patch-package @prisma/clientを実行する
  4. 本番環境でもパッチを反映するために、package.jsonに以下のscriptを追加する
"scripts": {
    "postinstall": "npx patch-package その他のパッケージ",

参考

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?