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! [email protected] 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 [email protected] tailwind:css script.

最佳答案

即使(以我的经验),一些heroku部署似乎在某种程度上摆脱了devDependencies中的不利因素,但将其移动到您的dependencies确实可以解决此问题。

这不仅会影响顺风,因此,为了使构建正常工作,您可能需要不只是顺风而行。

关于javascript - sh:1:顺风:部署到heroku时找不到,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54794776/

10-12 23:28