LoginSignup
7
1

More than 1 year has passed since last update.

何もしてないのに prisma studio が壊れた

Posted at

現象

npx prisma studio すると、Invalid string length エラーがでるようになった。
Screen Shot 2022-06-02 at 22.24.01.png

non-recoverable error とか言われると、慌てふためく。

エラーメッセージ詳細

Fatal Error
A non-recoverable error has occurred and Studio has to be restarted. Please consider reporting this error to us by opening an issue on GitHub and attaching the error details. If this persists, please clear out your IndexedDB and try again.

Invalid string length
RangeError: Invalid string length
at JSON.stringify ()
at _t.serialize (http://localhost:5555/assets/index.js:1:49091)
at _t.update (http://localhost:5555/assets/index.js:1:12197)
at Cc (http://localhost:5555/assets/vendor.js:50:6994)
at _t.n (http://localhost:5555/assets/vendor.js:50:6688)
at _t.update (http://localhost:5555/assets/index.js:1:48948)
at Cc (http://localhost:5555/assets/vendor.js:50:6994)
at _t.n (http://localhost:5555/assets/vendor.js:50:6688)
at http://localhost:5555/assets/index.js:1:82272
at Array.forEach ()

環境

next: 12.1.6
react: 18.1.0
@prisma/client: 3.14.0
prisma: 3.14.0

解消方法

Invalid string length?何か巨大なデータがうっかり入っちゃったりした?などと、慌てふためくけど、開発環境だとしても、DB のデータを削除してみるのは、やめましょう。DB 悪くない。

ちゃんと、解決方法書いてある。

If this persists, please clear out your IndexedDB and try again.
(それでも解決しない場合は、IndexedDBをクリアし、再度試してみてください)

逆だろ。先にクリア。

IndexedDB is 何?

Browser のキャッシュ的な。Chrome の場合、DevTools を開き、Application > IndexedDB からPrisma Studio を消す。
Screen Shot 2022-06-02 at 22.40.01.png

消したら、リロードして、元通り。

おしまい。

7
1
1

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
7
1