【发布时间】:2021-02-06 06:10:56
【问题描述】:
我创建了我的 react-app,然后才添加了 tailwind。
目前这是我的文件夹结构:
Package.json 看起来像这样:
"scripts": {
"start": "postcss src/tailwind.css -o src/styles.css && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
每当我将postcss 添加到脚本时,我无法运行我的npm start 脚本,并且当我不顺风时,css 根本没有应用于我的项目。
添加postcss时出现的错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phshopper@0.1.0 start: `postcss src/tailwind.css -o src/styles.css && react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phshopper@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thanks
【问题讨论】:
标签: npm tailwind-css