简体   繁体   English

顺风不与 npm 运行开发

[英]tailwind doesn't with npm run dev

I got a task to do which is to create some forms with tailwindcss but When I try to launch: npm run build, it does't work.我有一个任务要做,那就是用 tailwindcss 创建一些 forms 但是当我尝试启动时: npm 运行构建,它不起作用。 Could you help me?你可以帮帮我吗?

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

this is my package.json这是我的 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": ""
}

You need to install Tailwind CLI in order to execute tailwind commands:您需要安装 Tailwind CLI才能执行tailwind命令:

# Using NPM?
npm install -D tailwindcss

# Using yarn?
yarn add tailwindcss -D

Also, it helps to check the error log (as mentioned in the message printed to your terminal) to find out a full stack trace of the error.此外,它有助于检查错误日志(如打印到终端的消息中所述)以找出错误的完整堆栈跟踪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM