我有一個任務要做,那就是用 tailwindcss 創建一些表單,但是當我嘗試啟動時:npm run build,它不起作用。你可以幫幫我嗎?
npm ERR! code ELIFECYCLE
npm ERR! errno 9
npm ERR! widgets@1.0.0 dev: `tailwind build css/tailwind.css -o build/css/tailwind.css`
npm ERR! Exit status 9
npm ERR!
npm ERR! Failed at the widgets@1.0.0 dev 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! /Users/andresbolivar/.npm/_logs/2022-01-21T16_59_01_550Z-debug.log
這是我的 package.json
{
"name": "widgets",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev": "tailwind build style.css -o /css/tailwind.css"
},
"author": "",
"license": "ISC",
"devDependencies": {
"autoprefixer": "^10.4.2",
"postcss": "^8.4.5",
"tailwindcss": "^3.0.15"
},
"dependencies": {},
"description": ""
}
uj5u.com熱心網友回復:
您需要安裝 Tailwind CLI才能執行tailwind命令:
# Using NPM?
npm install -D tailwindcss
# Using yarn?
yarn add tailwindcss -D
此外,它有助于檢查錯誤日志(如列印到終端的訊息中所述)以找出錯誤的完整堆疊跟蹤。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/422071.html
標籤:
