3

In Reactjs, while running npm install, styled-components display an error. While installing other dependencies is working fine, the problem is with styled-components.

npm ERR! cannot read the properties of null (read "edgesOut").
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersDELLAppDataLocalnpm-cache_logs2023-05-09T07_37_18_586Z-debug-0.log
Xtremcool
  • 165
  • 3
  • 25
  • Does this answer your question? [npm ERR! Cannot read properties of null (reading 'pickAlgorithm')](https://stackoverflow.com/questions/70019872/npm-err-cannot-read-properties-of-null-reading-pickalgorithm) – RubenSmn May 09 '23 at 08:03

3 Answers3

5

I also have run into this issue.

Using

npm install styled-components@5.3.10

worked for me.

Harsh Mangalam
  • 1,116
  • 1
  • 10
  • 19
JTDev
  • 66
  • 1
0

That didn't work for me. I instead google searched npm styled-components and found that this worked for me:

npm install styled-components@^5.0.0 react@^16.8 react-dom@^16.8 react-is@^16.8
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 10 '23 at 19:26
0

Faced the same problem, version 5.3.10 was not installed either. Helped:

  1. delete folder node_modules
  2. delete package-lock.json
  3. npm i styled-components@latest or npm i styled-components@5.3.10 or npm i styled-components. Which one do you want.
  4. install all other packages npm i
Jhon Mosk
  • 1
  • 2