Reputation: 47
package.json
:
"devDependencies": {
"tailwindcss": "^0.7.4"
},
"scripts": {
"tailwind:css": "tailwind build src/css/tailwind.src.css -c tailwind.js -o src/css/tailwind.css",
"start": "npm run tailwind:css && react-scripts start",
"build": "npm run tailwind:css && react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
error:
sh: 1: tailwind: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! client@0.1.0 tailwind:css: `tailwind build src/css/tailwind.src.css -c tailwind.js -o src/css/tailwind.css`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the client@0.1.0 tailwind:css script.
Upvotes: 0
Views: 1255
Reputation: 1218
Even though (in my experience) some heroku deployments seem to somehow get away with tailwind in the devDependencies, moving it into your dependencies
does fix this issue.
This can affect more than just tailwind, so you might need to move more than just tailwind across for your build to work.
Upvotes: 1