charuka dissanayaka
charuka dissanayaka

Reputation: 23

Type error : you must pass a valid list of files to parse

here I got this error when adding the tailwind CSS.screenshot is attached herewith

  [https://i.sstatic.net/UC8NS.png][1]
package.json file
  "scripts": {
    "start": "npm run watch:css && react-scripts start",
    "build": "npm run watch:css && react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "buid:css": "postcss src/assets/tailwind.css -o src/assets/main.css",
    "watch:css": "postcss src/assets/tailwind.css -o src/assets/main.css"
  },

when I creating react app here I got an error. for CSS I used tailwind CSS. I did several changes .but the error was the same. How do I fix this error?

Upvotes: 0

Views: 9082

Answers (3)

Rahma ABDELHAMID
Rahma ABDELHAMID

Reputation: 1

you have some syntax error try this instead

"scripts": {
    "start": "npm run watch:css && react-scripts start",
    "build": "npm run watch:css && react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "build:css": "postcss src/assets/tailwind.css -o src/assets/main.css",
    "watch:css": "postcss src/assets/tailwind.css -o src/assets/main.css"
},

Upvotes: 0

Rajeshwar Sharma
Rajeshwar Sharma

Reputation: 31

Just cross verify the package.json file and static folder parent directory is same. I was having the same issue and then realized my package.json file and static folder not belongs to same parent

Upvotes: 0

zer0sign
zer0sign

Reputation: 163

Hei, I have the same problem, the problem is simple because a folder like assets does not exist, make sure the part

src/assets/tailwind.css

is exist in

watch:css": "postcss src/assets/tailwind.css -o src/assets/main.css

you can try to search part src/assets/tailwind.css in your directory folder

hope my answer is helpful

Upvotes: 7

Related Questions