Create React App 提供的 react-scripts 包需要一个依赖: [英] The react-scripts package provided by Create React App requires a dependency:

查看:78
本文介绍了Create React App 提供的 react-scripts 包需要一个依赖:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

项目依赖树可能有问题.这可能不是 Create React App 中的错误,而是您需要在本地修复的问题.

There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.

Create React App 提供的 react-scripts 包需要一个依赖:

The react-scripts package provided by Create React App requires a dependency:

"babel-eslint": "9.0.0"

不要尝试手动安装:您的包管理器会自动安装.但是,在树的更高位置检测到了不同版本的 babel-eslint:

推荐答案

在你的项目文件中创建.env文件并添加以下语句

create .env file in your project file and add the following statement

SKIP_PREFLIGHT_CHECK=true

保存文件

移除 node_modules、yarn.lock、package.lock

Remove node_modules, yarn.lock, package.lock

然后用

npm install

这应该有效

这篇关于Create React App 提供的 react-scripts 包需要一个依赖:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆