[英]Tailwind CSS not building
I'm currently practicing some tailwindcss frontend design.我目前正在练习一些 tailwindcss 前端设计。 I've installed it using npm, and I didn't get any errors.
我已经使用 npm 安装了它,我没有收到任何错误。 I made the build script for tailwindcss.
我为tailwindcss制作了构建脚本。 When I run the appropriate command to build the tailwindcss, it doesn't output it to the
style.css
file I set as the output file.当我运行适当的命令来构建 tailwindcss 时,它不会 output 到我设置为
style.css
文件的 style.css 文件。 I also don't get any errors.我也没有收到任何错误。 This is my code for the
package.json
file:这是我的
package.json
文件的代码:
{
"name": "design",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build:css": "tailwindcss build src/style.css -o dist/style.css"
},
"author": "",
"license": "ISC",
"dependencies": {
"tailwindcss": "^1.3.4"
}
}
You seem to be missing npx
in your command, try this instead:您的命令中似乎缺少
npx
,请尝试以下操作:
npx tailwindcss build src/style.css -o dist/style.css
https://tailwindcss.com/docs/installation/#4-process-your-css-with-tailwind https://tailwindcss.com/docs/installation/#4-process-your-css-with-tailwind
The correct way to add scripts:-添加脚本的正确方法:-
"build": "npx tailwindcss build src/style.css -o dist/style.css"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.