1

I am new to react framework and I am trying to make a web app with the help of Tailwind CSS. it runs on the browser when I followed these steps :

npx create-react-app my-project
cd my-project
npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
npm install @craco/craco
npx tailwindcss-cli@latest init
npm start

but when I reopen the editor and run the command npm start in the terminal, the following error shows:

PS D:\react1> npm start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR!     npm star # Mark your favorite packages
npm ERR!     npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\DELL\AppData\Local\npm-cache\_logs\2021-07-12T09_16_22_570Z-debug.log

Please help me where i am wrong. I followed this page for the installation of react with tailwind https://tailwindcss.com/docs/guides/create-react-app enter image description here

2
  • Please share your Package.json file too Commented Jul 12, 2021 at 9:25
  • even craco start doesn't work in terminal Commented Jul 12, 2021 at 9:33

3 Answers 3

1

Try

  1. npm i react-scripts
  2. npm start
Sign up to request clarification or add additional context in comments.

Comments

0

First do npm i react-scripts after that replace the current scripts with this:

"scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
    },

Then restart your visual studio code, and run in terminal: npm start

Comments

0

I got this error because I was not running the command npm start in a particular project directory. Like my project was in: D://React/react1 and I was running the command in D://React

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.