1

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"
  },

错误:

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.
4

1 回答 1

1

尽管(以我的经验)一些heroku部署似乎在devDependencies中顺风顺水,但将其移入您的dependencies确实可以解决此问题。

这不仅会影响顺风,因此您可能需要移动的不仅仅是顺风才能让您的构建工作。

于 2019-10-01T14:14:01.933 回答