Search code examples
node.jsreactjsnpmstyled-components

React error when installing styled-components


When I install others packages, everything is good, but when I install styled-components I get this error:

npm ERR! Cannot read properties of null (reading 'edgesOut')

npm ERR! A complete log of this run can be found in: C:\Users\igor\AppData\Local\npm-cache\_logs\2023-05-08T23_16_20_252Z-debug-0.log

(has two questions with this error here in stackoverflow, but both don't both posts didnt solve my problem)

I'm the unique getting this problem when installing styled-components.

I deleted the node-modules and the package-lock.json and I installed again, but I still get this error. I searched on youtube, google, everything, but I'm still get the same error.


Solution

  • Try to type

    npm install styled-components@latest
    

    in your project terminal.

    It will be working!