1

I was installing a react-app and am facing some issues. I tried to fix it by removing /node-modules and reinstalling but it's still giving me some issues. I am an ubuntu user. please help me with this. Here's the error log

suraj@suraj-Inspiron-15-3567:~/Documents/memories_project/client$ npm install axios 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.17.1 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.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 
(node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.2.1 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.2.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ axios@0.21.1
updated 1 package and audited 1841 packages in 17.99s

124 packages are looking for funding
run `npm fund` for details

found 1 low severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
Sudhanshu Kumar
  • 1,926
  • 1
  • 9
  • 21

1 Answers1

1

Peer dependencies are not automatically installed anymore, so you must install them by yourself You can follow these steps

  1. Delete 'package-lock.json' file
  2. In the Terminal go to the folder with your project and type npm install --save-dev typescript react
  3. Then type npm install

Or in your package JSON add the typescript in devDependencies with a version as required and follow the same steps above except point 2

"typescript": "^2.8.0"
 //same for react

Learn more here

As much as I see, There seems to be something wrong with your package.json file tho.

Sudhanshu Kumar
  • 1,926
  • 1
  • 9
  • 21
  • i am geeting same error like this: `npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for fsevents@2.2.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! notsup Valid OS: darwin npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: linux npm ERR! notsup Actual Arch: x64` – sunfarma hulla Dec 25 '20 at 06:39