npm - 我不知道发生了什么事
问题描述
我只想知道发生了什么,每当我从 github 下载一些反应代码(因为我想检查输出以获取灵感)并使用 npm start 运行它时,我都会在终端中看到它。
我应该怎么办?
sh: react-scripts: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! todo-react@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the todo-react@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/markcornejo/.npm/_logs/2021-05-20T09_35_52_922Z-debug.log
Marks-Air:todo-react-master markcornejo$
解决方案
运行npm install
before npm start
,以确保安装了所有依赖项。
推荐阅读
- python - 如何清理 Python 的外壳?
- python - 如何将图像(多维数组)数据拟合到 python 中的随机森林分类器中?
- xaml - Xamarin XAML,如何将元组列表绑定到可绑定布局
- r - 使用 Datatables Selected_Row 时如何获取特定列值
- c# - Angular 9 前端/ASP.Net C# MVC 后端
- python - CNN 给出相同的损失和准确性
- c# - 如何将布尔值转换为字符串?
- git - git:撤消对本地存储库的所有更改并获取上游存储库的副本
- python - 与 python 烧瓶的动态链接引发错误
- hibernate - 带有鉴别器列的 JPA @Embeddable 继承