How to solve Error : The react scripts package provided by Create React App requires a dependency

preview_player
Показать описание
In this video we present how you can solve Error : The react scripts package provided by Create React App requires a dependency.
Рекомендации по теме
Комментарии
Автор

This is a terrible solution.

It doesn't fix the problem, it only hides the issue. It will very likely lead to more bugs because you're hiding the preflight check, which looks for those versioning problems beforehand.

TLDR: Follow the instructions that pop up in the error message. LAST RESORT is to skip the preflight check.

The common consensus is 1 of 2 things are likely happening:
1) You've run `npm install` or `yarn install` somewhere you shouldn't have. If you look up the directory tree, you'll probably see there's an additional node_modules directory that shouldn't be there. Delete it.

2) There's a versioning issue because you have multiple packages installing your dependency with different versions. This can normally be easily resolved by deleting your node_modules directory and package-LOCK.json file, then running `npm install` or `yarn install`.

Good luck. Don't use the method in this video.

ReadingAmbience