Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx command failing #19

Open
guivr opened this issue Nov 1, 2021 · 1 comment
Open

npx command failing #19

guivr opened this issue Nov 1, 2021 · 1 comment

Comments

@guivr
Copy link

guivr commented Nov 1, 2021

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!

@miklosme
Copy link
Owner

miklosme commented Nov 2, 2021

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; }"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants