Skip to content

Are "react scripts" dependencies broken? #7703

Closed
@dzaraev

Description

@dzaraev

Describe the bug

I'm learning react and have a problem with create-react-app package. Once I've created a new project with create-react-app and typed "npm list --depth 0" - I got the following errors:

PS C:\Users\dmitriiz\Documents\Sources\Sandbox\lovereact> npm list --depth 0
[email protected] C:\Users\dmitriiz\Documents\Sources\Sandbox\lovereact
+-- [email protected]
+-- [email protected]
'-- [email protected]

npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/[email protected]
npm ERR! peer dep missing: eslint@^5.0.0, required by @typescript-eslint/[email protected]
npm ERR! peer dep missing: typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta, required by [email protected]
  1. I create the app as: npx create-react-app lovereact (tried other ways - same result)
  2. I don't install anything else (as you can see in the list above)
  3. In my global list I have only npm package installed:
C:\Users\dmitriiz\AppData\Roaming\npm
`-- [email protected]
  1. My Node version is 10.14.1
  2. I tried to install create-react-app globally and use the global instance, tried to install different packages to cure the errors, and some other things - nothing helps.
  3. Is something wrong with create-react-app? For example this file:
    lovereact\node_modules\@typescript-eslint\eslint-plugin\package.json
    has this eslint peer dep:
"peerDependencies": {
    "@typescript-eslint/parser": "^1.9.0",
    "eslint": "^5.0.0"
  },

while the same time the lovereact\node_modules@typescript-eslint folder has not any eslint package inside. Ok maybe it should take the "eslint" package from the previous level at lovereact\node_modules\ ? Yes, create-react-app already has eslint package here and its version is 6.4.0
"_id": "[email protected]",
that definitely should conform the "eslint": "^5.0.0" requirement, isn't it?
I didn't investigate other ERR messages though, but I suppose they speak truth.

So please tell what's wrong with me or with create-react-app? I can't find exact the same problem on the Internet (including SO) but the same time I see that something wrong with create-react app default installation. Or maybe I miss something?

Thank you in advance!

Did you try recovering your dependencies?

Yes, I tried to delete node_modules and npm lock file right after new project get created (with creat-react-app) and then tried "npm install" but it doesn't help - the same result after npm list.

Which terms did you search for in User Guide?

I did search (using google, SO, troubleshooting etc.) many words generally from the ERR messages above in different combinations and more but didn't found exactly the same errors combination or something even close to it.

Environment

Editor/CLI: Visual Studio Code 1.38.1

System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Binaries:
Node: 10.14.1 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.11.3 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.329.0
Internet Explorer: 11.0.18362.1
npmPackages:
react: ^16.9.0 => 16.9.0
react-dom: ^16.9.0 => 16.9.0
react-scripts: 3.1.1 => 3.1.1
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

  1. open any folder on you local pc with command line
  2. type: npx create-react-app any-project-name --use-npm, wait for it get installed
  3. type: npm list --depth 0
  4. you got the three ERR message as I posted above

Expected behavior

I don't like to see any errors right after the empty project init. I didn't find any "known problem" note about this on create-react-app documentation or anywhere else.
So I suppose for clean empty project initialized with latest create-react-app to be free of any ERR and WARN messages.

Actual behavior

described above in the beginning of the post, with listings from my terminal (Visual Studio Code)

Reproducible demo

just create a new empty project with latest create-react-app and npm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions