nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.35k stars 169 forks source link

Prettier is not correctly configured in updated tailwind/expo v2 monorepo #438

Closed xerxiastudios closed 8 months ago

xerxiastudios commented 8 months ago

Is there an existing issue for this?

Do you want this issue prioritized?

Current Behavior

npx create-solito-app@latest my-solito-app -t with-tailwind

For this repo, prettier is not working.

"ERROR" - 05:13:32] Error resolving prettier configuration for /packages/app/features/user/detail-screen.tsx ["ERROR" - 05:13:32] A dynamic import callback was not specified. TypeError: A dynamic import callback was not specified. at new NodeError (node:internal/errors:399:5) at importModuleDynamicallyCallback (node:internal/process/esm_loader:39:9)

Expected Behavior

No response

Steps To Reproduce

No response

Versions

- Solito:4.0.1
- Next.js:13.4.19
- Expo:49.0.0
- React Native:0.72.4

Screenshots

No response

Reproduction

No response

nandorojo commented 8 months ago

For others who stumble here, the solution so far is to do yarn remove prettier-plugin-tailwindcss, or to address this here: https://github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/207#issuecomment-1698071122

Open to a PR fixing it.

ony3000 commented 8 months ago

@xerxiastudios I tried running npx create-solito-app@latest my-solito-app -t with-tailwind on my PC, and it turns out that the versions of prettier and prettier-plugin-tailwindcss are incompatible.

This problem can be resolved in one of two ways:

  1. Leave prettier-plugin-tailwindcss as is and upgrade the version of prettier to ^3.
  2. Leave prettier as is and downgrade the version of prettier-plugin-tailwindcss to <0.5.
nandorojo commented 8 months ago

Could you please submit a PR?

nandorojo commented 8 months ago

Related: #145

ony3000 commented 8 months ago

Yes, I will give it a try.

Do you have a preferred version of Prettier?