remix-run / blues-stack

The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.
https://remix.run/stacks
MIT License
961 stars 236 forks source link

Support `pnpm` natively #37

Closed illright closed 2 years ago

illright commented 2 years ago

There's an active issue in the main Remix package about pnpm compatibility: https://github.com/remix-run/remix/issues/154. Over there, people have previously complained that the Remix app wouldn't work due to undeclared dependencies. I've tried creating a fresh Remix app, seems to be working just fine.

However, when I use the Indie stack (and opt out of running npm install due to wanting to use pnpm) and install the dependencies through pnpm, I get the following batch of unmet peer dependencies:

 WARN  Issues with peer dependencies found
.
├─┬ @testing-library/user-event
│ └── ✕ missing peer @testing-library/dom@>=7.21.4
├─┬ tailwindcss
│ └── ✕ missing peer autoprefixer@^10.0.2
├─┬ ts-node
│ └── ✕ missing peer @types/node@"*"
└─┬ vite-tsconfig-paths
  └── ✕ missing peer vite@>2.0.0-0
Peer dependencies that should be installed:
  @testing-library/dom@>=7.21.4  autoprefixer@^10.0.2           
  @types/node@"*"                vite@>2.0.0-0

Seems like those dependencies are missing from this exact package, so it should be an easy fix. I for one have fixed it with (note the postcss at the end as well):

pnpm add -D @testing-library/dom autoprefixer @types/node vite postcss

:star: Bonus points for detecting when pnpm is the preferred package manager and substituting it into the commands so that pnpm users could make full use of the initialization script :)

kentcdodds commented 2 years ago

Sounds good. A PR would be welcome 👍