ERROR: yarn rw db save & linting disabled on prisma?


I received an error on the command line when running yarn rw db save shown below and a formatting error on the output. These were working before on the tutorials. I created a new project and did the whole set up following the tutorial. when it came to creating the model and doing a migration, it gave me the errors.

```The above error occurred in the <TabIndexProvider> component:
    in TabIndexProvider
    in App

React will try to recreate this component tree from scratch using the error boundary you provided, App.
Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.```

Another problem is the formatting on prisma files have stopped.

prisma-fmt error'd during formatting

How do i go about fixing these?

Hi @krh! Thanks for posting these questions and sorry you’ve run into some hiccups.

A couple of things that would help us help you diagnose the next steps:

  • your system info: could you paste the output in a reply from running yarn rw info
  • would it be possible to share the link to your repo (if public)? Or perhaps code from your schema.prisma and related files?

Just to make sure I understand clearly, it sounds like you went through the Tutorial first and are now attempting to customize it from there, correct?

Last question, could you also run yarn prisma --version and paste the output as well?


Hi @thedavid!

thank you for the speedy reply!

yarn rw info

    OS: macOS High Sierra 10.13.6
    Shell: 3.2.57 - /bin/bash
    Node: 14.2.0 - /var/folders/gb/kwc08b655sn10cb0tl4f3xh80000gn/T/yarn--1594686815571-0.3210870132495627/node
    Yarn: 1.22.4 - /var/folders/gb/kwc08b655sn10cb0tl4f3xh80000gn/T/yarn--1594686815571-0.3210870132495627/yarn
    SQLite: 3.19.3 - /usr/bin/sqlite3
    Chrome: 83.0.4103.116
    Safari: 13.1.1
    @redwoodjs/core: ^0.13.0 => 0.13.0 

yarn prisma --version

 @prisma/cli          : 2.2.1
        Current platform     : darwin
        Query Engine         : query-engine 832e37683666c748b0a1cbdc2c5068b5e443e816 (at /Users/krh/Desktop/Tutorial/Redwood/rw-todo-database/Redwood-Todo/rw-todo/node_modules/@prisma/cli/query-engine-darwin)
        Migration Engine     : migration-engine-cli 832e37683666c748b0a1cbdc2c5068b5e443e816 (at /Users/krh/Desktop/Tutorial/Redwood/rw-todo-database/Redwood-Todo/rw-todo/node_modules/@prisma/cli/migration-engine-darwin)
        Introspection Engine : introspection-core 832e37683666c748b0a1cbdc2c5068b5e443e816 (at /Users/krh/Desktop/Tutorial/Redwood/rw-todo-database/Redwood-Todo/rw-todo/node_modules/@prisma/cli/introspection-engine-darwin)
        Format Binary        : prisma-fmt 832e37683666c748b0a1cbdc2c5068b5e443e816 (at /Users/krh/Desktop/Tutorial/Redwood/rw-todo-database/Redwood-Todo/rw-todo/node_modules/@prisma/cli/prisma-fmt-darwin)

I followed the tutorial and now experimenting. I’m attempting to make a todolist with redwoodjs and implementing relationships with different models that i created.

The link to the repo is here:
I did something with the master branch, so it doesnt work have the updated commits, however, the feature/pages branch is updated and works.

Thank you!

Ok, another question --> did you upgrade to v0.13.0 from a previous version, and, if so did you have to remove the yarn.lock and reinstall packages?

We’re using Prisma/cli 2.1.1 in Redwood currently even though Prisma 2.2 is out. Normally the yarn.lock would keep the versions “in sync”. But because of the hiccups with upgrading this loophole for 2.2 snuck in.

If this is your case, there’s a chance it could be the cause of the problem. (Note, I still haven’t looked through your repo.) I’d need to think through a path to revert the Prisma packages to 2.1.1. Maybe one way is to replace your yarn.lock with the one from here and then run yarn install: :thinking:

This was very helpful. Thank you!

I didn’t have to remove yarn.lock when upgrading initially. After reading your reply, I don’t know if it would help but i tried to upgrade again, deleted yarn.lock after upgrading and then reinstalled packages. I was still getting errors.

You’re likely right bout the cause of the problem. After I replaced the yarn.lock file from the link you provided, it definitely solved the formatting and migration issue that i had trouble with.

Thank you, again!