Ravenous part 4 problem

hey there , I am having some problems in ravenous specifically part 4 . you see on step 7 I have to install fetch() when I tried to install the fetch() browser API when I type npm install whatwg-fetch --save and press enter it doesn’t work instead it shows me this ,


npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.13.12 requires a peer of @babel/core@^7.13.0 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.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“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”:“win32”,“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”:“win32”,“arch”:“x64”})

  • whatwg-fetch@3.6.2
    updated 1 package and audited 1941 packages in 21.583s

139 packages are looking for funding
run npm fund for details

found 3 moderate severity vulnerabilities
run npm audit fix to fix them, or npm audit for details


I don’t understand what’s wrong I ran npm audit fix and it got from the original 5 down to 3 so this is what came after I ran npm audit fix after i tried again

what do I do now I don’t know, why does it do that ? what is the error exactly in that message? how do I debug it and what to do to install fetch without running into this error?


thanks.

I also encountered this error message when trying to install modules. If I remember correctly, adding this flag solved my problem:

--legacy-peer-deps

Have a look at this article that explains the issue:

This issue is being driven, in part, by React v17
Due to the overwhelming number of modules that haven’t specifically added React v17 as a peerDependency, it’s now commonplace to encounter the unable to resolve dependency tree error when running npm installs within a v17 React application.

 npm install whatwg-fetch --save --legacy-peer-deps

i typed that and it still showed me the same error

–save does the opposite as --legacy-peer-deps. These flags are contradicting each other. So try it once again without.

it is still the same thing

This warning is just about skipped dependencies due to deprecation though. Did you try the module you installed? Maybe you can ignore the warning.

um no I just stopped when the error or warning came

i don’t know how to test it

You installed the module to fetch data, right? So you could try to fetch data. And if it works, it’s fine.

hmm, let me try that.

still it doesn’t work

What exactly doesn’t work?

wait never mind some data being fetched isn’t working but some is working I am getting the address and other stuff

thanks for the help :smiley:

1 Like

I am now fixing the rest they are some type errors that I done