sh: 1: tailwind: 运行 npm start 时未找到

Posted

技术标签:

【中文标题】sh: 1: tailwind: 运行 npm start 时未找到【英文标题】:sh: 1: tailwind: not found when run npm start 【发布时间】:2019-12-04 11:07:03 【问题描述】:

您好,我用 react 配置了 tailwind css,但是当我运行 npm start sh: 1: tailwind: not found 时一直出错

demo@0.1.0 开始 /home/tarek/Documents/Tong/tripcanvas-assesment npm run tailwind:css && react-scripts start

demo@0.1.0 tailwind:css /home/tarek/Documents/Tong/tripcanvas-assesment 尾风构建 src/css/tailwind.src.css -c tailwind.js -o src/css/tailwind.css

sh: 1: tailwind: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! demo@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 demo@0.1.0 tailwind:css script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tarek/.npm/_logs/2019-07-26T06_27_45_711Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! demo@0.1.0 start: `npm run tailwind:css && react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the demo@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tarek/.npm/_logs/2019-07-26T06_27_45_757Z-debug.log

【问题讨论】:

给我们更多代码来处理 doc。 【参考方案1】:

你能告诉我们你的 package.json 吗?

您是否安装了脚本? npmyarn

【讨论】:

以上是关于sh: 1: tailwind: 运行 npm start 时未找到的主要内容,如果未能解决你的问题,请参考以下文章

我无法使用 npm run dev 启动 Next.js 和 tailwind 项目

命令'/ bin / sh -c npm install'返回非零代码:1

Tailwind CSS 未应用某些样式

如何设置 WebStorm 以使用 PostCSS/Tailwind

Tailwind CSS 不适用于 React App

npm run prod 后的错误