Closed bilogic closed 1 year ago
More info provided in the OP update. Thank you.
Thanks for creating the issue @bilogic I could not reproduce in my environment but it might be there have not tailwindcss module in global.
Global installation is a little complicated to resolve dependencies, so I would recommend using local dependencies if possible.
$ cd your_project
$ npm install --save-dev blade-formatter tailwindcss
$ ./node_modules/.bin/blade-formatter --sort-tailwindcss-classes target.blade.php
Hey thanks! I managed to resolve the issue already, can't remember how though. Haha
Description
I installed blade-formatter globally to
/usr/bin
, usingnpm set prefix /usr
, i.e.Each time I run it with
--sort-tailwindcss-classes
, I get there errormessage: "Cannot find module 'tailwindcss/defaultTheme'"
Without
--sort-tailwindcss-classes
,blade-formatter
formats correctly.Expected Behavior
blade-formatter
should format without errorActual Behavior
blade-formatter
throwsmessage: "Cannot find module 'tailwindcss/defaultTheme'"
Additional Context
No response