reactjs - 如何在浏览器上运行反应?
问题描述
我是反应框架的新手,我正在尝试在 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
请帮助我哪里错了。我按照此页面安装了带有尾风的反应 https://tailwindcss.com/docs/guides/create-react-app
解决方案
尝试
- npm 我反应脚本
- npm 开始
推荐阅读
- python - 我让 Class Object 继承 Class Turtle。获取属性错误
- javascript - 尝试使用 javascript 和 css 在点击时更改 img src?
- spring - 在 JPA 中使用 CrudRepository save() 方法仅更新多个对象是否有任何限制?
- ffmpeg - FFmpeg 从文件“如果存在”中删除字幕
- apache-flink - 需要一些 flink-sql 流式处理的例子
- docker - 使用 UI 在给定时间停止或运行 docker 容器
- python - tkinter:如何动态更改树视图中的列数
- javascript - 如何使用 Three.js 将多个 3D 对象链接到列表按钮?
- python - 全局平均池化不影响训练速度
- c++ - 由于____chkstk_darwin,在 Catalina 上使用 Deployment 10.10 编译的 MacOS 应用程序在 < HighSierra 的版本上崩溃