首页 > 解决方案 > 我不知道发生了什么事

问题描述

我只想知道发生了什么,每当我从 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

解决方案


运行npm installbefore npm start,以确保安装了所有依赖项。


推荐阅读