0

I am new for react js and tailwind components.

I successfully install react in my page. Its working fine.

But I want install tailwind css for old npm, node version like as

{ node: 'v10.15.3', npm: '7.23.0' }

I trying to create tailwind config file but i got error like below

NPM\myapp>npx tailwindcss init
(node:72880) ExperimentalWarning: The fs.promises API is experimental
C:\Users\EXQ504\NPM\myapp\node_modules\@tailwindcss\postcss7-compat\node_modules\color\index.js:257
                        lum[i] = (chan <= 0.039_28) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
                                          ^^^^^

SyntaxError: Invalid or unexpected token
    at new Script (vm.js:80:7)
    at createScript (vm.js:274:10)
    at Object.runInThisContext (vm.js:326:10)
    at Module._compile (internal/modules/cjs/loader.js:664:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

I searched some long time but I didn't found good answer in my search criteria. Any one can help ... Thanks in advance.

3 Answers 3

1

Install Tailwind CSS via npm follow steps are mentioned on website website url :https://www.ordinarycoders.com/blog/article/reactjs-tailwindcss

Sign up to request clarification or add additional context in comments.

3 Comments

I have follow up that same steps, but I got error like above
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
0

tailwind requires node 12.13+

https://tailwindcss.com/docs/installation

please upgrade your node version

2 Comments

I want to install tailwind css in node v10.15.3 version only.
I'm afraid you can't do that. bcz the document clearly mentions it should be 12.13+
0

open cmd in your project folder and enter below command:
npm install -D tailwindcss
then, enter npx tailwindcss init command if you want to create tailwindcss config file.

for more details you can refer, https://tailwindcss.com/docs/installation

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.