remix-run / examples

A community-driven repository showcasing examples using Remix πŸ’Ώ
MIT License
1.08k stars 236 forks source link

Migrate examples to latest remix v2 #485

Open machour opened 5 months ago

machour commented 5 months ago

Keeping track of progress here:

machour commented 5 months ago

Also updated UnoCSS's remix example: https://github.com/unocss/unocss/pull/3850

imaitland commented 4 months ago

@machour Curious - Why is jokes archived and "won't be touched". The prod build currently fails with:

➜  _official-jokes git:(main) npx prisma migrate deploy
Need to install the following packages:
prisma@5.16.2
Ok to proceed? (y) y

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "dev.db" at "file:./dev.db"

1 migration found in prisma/migrations

No pending migrations to apply.
➜  _official-jokes git:(main) npm start

> start
> remix-serve build

Error: Directory import '/Users/iainland/Projects/remix-palyground/examples/_official-jokes/build' is not supported resolving ES modules imported from /Users/iainland/Projects/remix-palyground/examples/_official-jokes/node_modules/@remix-run/serve/dist/cli.js
Did you mean to import "/Users/iainland/Projects/remix-palyground/examples/_official-jokes/build/index.js"?
    at finalizeResolution (node:internal/modules/esm/resolve:259:11)
    at moduleResolve (node:internal/modules/esm/resolve:933:10)
    at defaultResolve (node:internal/modules/esm/resolve:1157:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleLoader.import (node:internal/modules/esm/loader:315:34)
    at defaultImportModuleDynamically (node:internal/modules/esm/utils:194:31)
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:216:12)
    at reimportServer (/Users/iainland/Projects/remix-palyground/examples/_official-jokes/node_modules/@remix-run/serve/dist/cli.js:86:81)
machour commented 4 months ago

@imaitland This is a decision made with Brooks over discord, without being aware of the issue you're posting. Thank you for bringing it to our attention πŸ™πŸΌ

The idea was that the jokes tutorial was retried from the documentation, and we weren't interested in maintaining a legacy Remix v1 app.

CC'ing @brookslybrand to have a new look at this decision. Maybe we could spend some time fixing the example, or just add a note in its README stating that it's archived, and why.

brookslybrand commented 4 months ago

@imaitland This is a decision made with Brooks over discord, without being aware of the issue you're posting. Thank you for bringing it to our attention πŸ™πŸΌ

The idea was that the jokes tutorial was retried from the documentation, and we weren't interested in maintaining a legacy Remix v1 app.

CC'ing @brookslybrand to have a new look at this decision. Maybe we could spend some time fixing the example, or just add a note in its README stating that it's archived, and why.

Yep, that is correct. Someone is definitely welcome to submit a PR to fix the issue for anyone who still finds the tutorial useful, but since it is not the official tutorial the Remix team is not focused on moving it to v2.

I do like the idea @machour of adding a note to the README about why it is archived