Hi, I'm new, but trying the tutorial and need help w/part 2 DB

So, how to fix this? Same problem.

I have two ways to get this to work on windows;

  1. WSL
  2. Run Postgres Locally

Initially my workaround was to do the development on WSL. This works.

I’ve started the project I wanted to after the tutorial and now I can run RedwoodJS locally on windows. The only change that I’m noting is the db
It seems to have to do with sqlite on windows.
I am able to run this if I connect postgres locally or online.

However now that I started the actual work I wanted, it seems it has to do with the db type. If you change your db type from sqlite to postgres, and install and run postgres, then set your env variable to connect, you should also be able to work.

I’m using Docker to run my postgres.

Windows still seem to hang on yarn rw db up but it works if you ctrlc

Below are the details I’m using locally.
File ./.env: DATABASE_URL=postgres://postgres:example@localhost/news?connection_limit=1
File ./api/prisma/schema.prisma Line4: provider = ["postgresql"]

Thanks for getting back with your findings Jace. I’ve definitely run through the tutorial successfully on windows before, but I have to admit that it’s been a while. Just like you I’ve moved to running psql locally

I should click through the tutorial again. Hopefully I get the same error as you folks, so that I can diagnose further.

I think using WSL2 is a very sensible default and I think actually ok to just say this is how it works right now. I imagine many devs are using WSL2 because it works so well and has a great docker integration.

I use windows and WSL2 and it makes development a breeze.

Rather than spending time getting redwood to work on windows without WSL2, there are much better problems to work on I feel.

The only problem with using WSL2 is if I open up vscode I can’t use the cool new redwood plugin

Yep, the plugin does not work on WSL2 but I am sure it’s a known issue and being worked on! I don’t think the plugin is worth the hassle of hours spent getting it to work on windows though :slight_smile:

I just went through the tutorial (the written tutorial, not the video). And everything seems to work fine.

tobbe@XPS9550 MINGW64 ~/dev/redwood/rwtut (main)
$ yarn rw info
yarn run v1.22.4
$ C:\Users\tobbe\dev\redwood\rwtut\node_modules\.bin\rw info

  System:
    OS: Windows 10 10.0.19041
  Binaries:
    Node: 14.4.0 - ~\AppData\Local\Temp\yarn--1605726641121-0.7410713023439661\node.CMD
    Yarn: 1.22.4 - ~\AppData\Local\Temp\yarn--1605726641121-0.7410713023439661\yarn.CMD
  Browsers:
    Chrome: 86.0.4240.198
    Edge: Spartan (44.19041.423.0), Chromium (86.0.622.69)
  npmPackages:
    @redwoodjs/core: ^0.20.0 => 0.20.0

Done in 3.51s.
$ git --version
git version 2.29.1.windows.1

The tutorial asks me to run yarn redwood db save create posts and that runs just fine. It completes saying it created the migration. And after that I can successfully run yarn rw db up