remix-run / indie-stack

The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.
https://remix.run/stacks
MIT License
1.08k stars 311 forks source link

Failed app run #207

Closed alexandrsashin closed 1 year ago

alexandrsashin commented 1 year ago

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

  1. The problem in app/root.tsx:12: import doesn't work because ./styles folder is absent.
  2. Error Environment variable not found: DATABASE_URL. The reason - .env file is absent. It needs to copy .env.example and rename it to .env. It will be good to write about it in README.md.

Expected Behavior

Working project after:

  1. npx create-remix --template remix-run/indie-stack onewheel-blog
  2. cd onewheel-blog && npm install
  3. Copy .env.example and rename to .env
  4. npm run dev

Actual Behavior

There are two errors described in Steps to Reproduce

machour commented 1 year ago

Hey,

  1. Problem is that tailwind didn't finish its initial run before remix ran, so the styles/ folder wasn't there. Running the npm run dev command again should fix the issue. The problem will disappear once https://github.com/remix-run/indie-stack/pull/195 gets merged.

  2. This is indeed needed for Prisma to work. The init phase should have copied the .env.example file into .env The README does say:

This step only applies if you've opted out of having the CLI install dependencies for you:

npx remix init

Did you opt out of having the CLI install deps for you?

alexandrsashin commented 1 year ago

I used Remix course (https://egghead.io/courses/up-and-running-with-remix-b82b6bb6) for template installation. The link to this course I found here: https://remix.run/docs/en/1.14.3/tutorials/blog#md-quickstart

To be honest, I didn't use CLI commands (https://remix.run/docs/en/1.14.3/tutorials/blog#md-quickstart) before errors fixing. I checked, npx remix init really solves such problems. Thanks!

Maybe it will be a good idea to update course in egghead.io or add comment to this course link in Quickstart.

machour commented 1 year ago

/cc @kentcdodds so that he can see your suggestions