【发布时间】:2021-09-21 11:20:14
【问题描述】:
我是 React 框架的新手,我正在尝试在 Tailwind CSS 的帮助下制作一个 Web 应用程序。当我按照以下步骤操作时,它会在浏览器上运行:
npx create-react-app my-project
cd my-project
npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
npm install @craco/craco
npx tailwindcss-cli@latest init
npm start
但是当我重新打开编辑器并在终端中运行命令 npm start 时,显示以下错误:
PS D:\react1> npm start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DELL\AppData\Local\npm-cache\_logs\2021-07-12T09_16_22_570Z-debug.log
请帮助我哪里错了。我按照这个页面安装了 react with tailwind https://tailwindcss.com/docs/guides/create-react-app
【问题讨论】:
-
请也分享您的 Package.json 文件
-
甚至 craco start 在终端中也不起作用
标签: reactjs npm tailwind-css