When installing Tailwind-CSS, I ran this command
yarn add tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
I got this error message, which tells me to update node to a compatible version.
**error** tailwindcss@2.1.2: The engine "node" is incompatible with this module. Expected version ">=12.13.0". Got "10.24.1"
So how do I update node properly? I am using Ruby on Rails 6
Update
When I updated node, I ran into a subsequent problem. This is what I ran to update node
nvm install 12.22.1
Now when I try to install Tailwind-CSS, I get a different error message.
Command 'yarn' not found
So then I ran nvm use 10.24.1 and I am back to square one.
When you install via yarn, append
--ignore-engines
So the full installation command is
yarn add tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9 --ignore-engines
I don't know why this works, but it does