css-to-tailwind icon indicating copy to clipboard operation
css-to-tailwind copied to clipboard

npx command failing

Open guivr opened this issue 4 years ago • 1 comments

Hi, thanks for this lib! I've been trying to run the npx command from the docs: npx css-to-tailwind ".logo { margin-bottom: 1.6rem; min-height: 4rem; display: flex; justify-content: center; }"

but I'm getting:

(node:20152) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'experimental' of null
  at flagEnabled (/Users/a/a/node_modules/css-to-tailwind/node_modules/tailwindcss/lib/featureFlags.js:29:19)

Am I doing something wrong? Thanks!

guivr avatar Nov 01 '21 07:11 guivr

Yeah, npx does the same for me, but when I run it locally, it works fine. The problem must be npx installs a newer version of Tailwind. I don't know why npx does this and how to prevent.

You can make it work if you clone the repo, do a yarn install, and run the local version: node cli.js ".logo { margin-bottom: 1.6rem; min-height: 4rem; display: flex; justify-content: center; }"

miklosme avatar Nov 02 '21 17:11 miklosme