SAIF AHMED ANIK
SAIF AHMED ANIK

Reputation: 865

How to get rid of "npm WARN [email protected] requires a peer of [email protected] but none is installed" warning

I have created an react app using

create-react-app pics

command. But unfortunately I got some warnings. How can I get rid of these warnings?

npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] 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: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Upvotes: 3

Views: 3571

Answers (3)

ctrlaltdeleon
ctrlaltdeleon

Reputation: 406

You can look at this post for more info on how to get rid of those warnings.

You could either do npm install [email protected] to address the problem at hand or with the command create-react-app pics, append a -s meaning silent among others (--loglevel=error, etc.) to suppress the warnings. create-react-app pics -s (Remember the errors are valid, just not shown on the terminal anymore.)

Upvotes: 1

Dasun Bandara
Dasun Bandara

Reputation: 189

Use this command: npm i [email protected]

Upvotes: 1

AKX
AKX

Reputation: 169267

They are warnings about optional dependencies and peer dependencies. If things nevertheless work, you can ignore them.

Upvotes: 1

Related Questions