avocadowastaken/prettier-plugin-prisma

Doesn't seem to work when using pnpm

Pika-Pool opened this issue · 2 comments

Describe the bug
When using pnpm as the package manager, this message is shown:

npx prettier prisma\schema.prisma 
Checking formatting...
prisma\schema.prisma[error] No parser could be inferred for file: prisma\schema.prisma
All matched files use Prettier code style!

Is this a problem with any prettier plugin with pnpm or is it specific to this plugin?

To Reproduce
use pnpm to add prettier and prettier-plugin-prisma to dependencies and run prettier on a prisma file

pnpm add -D prettier prettier-plugin-prisma
pnpx prettier -c prisma\schema.prisma

Expected behavior
Prettier should be able to automatically find this plugin and format a .prisma file

Tools (please provide the output of the following commands):

  • Node version: 16.2.0
  • OS name: Windows 10
  • Installed prettier versions: 2.4.1
  • Installed plugin versions: 3.4.1

Hey @Pika-Pool, I'm not a pnpm myself, but after quick search I found this issue: prettier/prettier#8056, please check and tell me if it works for you.

Yeah, it seems to be a prettier issue and not this plugin's. Thanks for pointing it out