7

Trying to install dependencies below

npm install axios moment react-file-base64 redux redux-thunk

Having these warn issues

npm WARN @apideck/better-ajv-errors@0.3.2 requires a peer of ajv@>=8 but none is installed. You must install peer dependencies yourself.
npm WARN fork-ts-checker-webpack-plugin@6.5.0 requires a peer of typescript@>= 2.7 but none is installed. You must install peer dependencies yourself.
npm WARN react-file-base64@1.0.3 requires a peer of react@^15.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of 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 but none is installed. You must install peer dependencies yourself.

How can I fix it?

feiyechen
  • 101
  • 1
  • 5

2 Answers2

9

Those are peer dependencies, not actual dependencies. Here is a good article explaining the difference. Peer dependencies are just to let users know what versions of various packages your installed package is compatible with. You don't need to fix these issues, as they are just letting you know which versions of various packages are compatible IF you want to use those packages sometime in the future.

In short, you can just start you project as-is, there is nothing that needs fixing.

Gbox4
  • 623
  • 2
  • 10
2

Newer versions of npm do not install peer dependencies automatically.

To get rid of your warnings, you can install the packages that are being requested as needed.

npm install --save-dev "<dependency_pkg>"

The --save-dev means that it will be saved to devDependencies

You can find much more details in the various answers on this similar question: npm WARN ... requires a peer of ... but none is installed. You must install peer dependencies yourself

Rino Bino
  • 366
  • 3
  • 15